Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Graphics Object and DrawLine - Offset a line?

Reply
Thread Tools

Graphics Object and DrawLine - Offset a line?

 
 
Mel
Guest
Posts: n/a
 
      07-01-2008
This is a long shot but here goes... I have a line that may have
several bends (angles) to it. Anyone know of any tips or tricks to
create the same line again but just have it offset from the original
line a small amount?

Example L-Shaped Line:
1" long
90 degree angle
1"long
 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      07-02-2008
you don't say which graphics library you using. but normally you'd
create an array of points, darw a polygon, then do a transform of the
point array and draw a second polygon.

-- bruce (sqlwork.com)

Mel wrote:
> This is a long shot but here goes... I have a line that may have
> several bends (angles) to it. Anyone know of any tips or tricks to
> create the same line again but just have it offset from the original
> line a small amount?
>
> Example L-Shaped Line:
> 1" long
> 90 degree angle
> 1"long

 
Reply With Quote
 
 
 
 
Mel
Guest
Posts: n/a
 
      07-02-2008
On Jul 1, 9:46 pm, bruce barker <(E-Mail Removed)> wrote:
> you don't say which graphics library you using. but normally you'd
> create an array of points, darw a polygon, then do a transform of the
> point array and draw a second polygon.
>
> -- bruce (sqlwork.com)
>
> Mel wrote:
> > This is a long shot but here goes... I have a line that may have
> > several bends (angles) to it. Anyone know of any tips or tricks to
> > create the same line again but just have it offset from the original
> > line a small amount?

>
> > Example L-Shaped Line:
> > 1" long
> > 90 degree angle
> > 1"long


I have System.Drawing as a reference. Can you elaborate on how to
"transform" the point array? I am assuming you mean just manually go
through all the points and adjust them accordingly (+ or - depending
on the offset side).
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing offset-aware and offset-naive datetimes? Roy Smith Python 4 01-27-2013 03:17 PM
Intel HD Graphics 3000 and Intel HD Graphics 2000 Review Ian Front Page News 0 02-24-2011 03:07 PM
drawline Ben Bush Python 3 11-26-2005 01:45 AM
HOW TO: Find the Top & Left window offset of an embed'ed [Flash] object. gsb Javascript 3 11-24-2003 10:54 AM
Translated Offset to Source Offset Lance Riedel XML 2 10-15-2003 03:04 PM



Advertisments