BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

example of drawlines in GDIplus?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
scchui
Guest





PostPosted: Thu Mar 17, 2005 3:16 pm    Post subject: example of drawlines in GDIplus? Reply with quote



Hi,
I am not quite understand the use of Drawlines in GDIplus. Anyone has a
simple example of this in delphi? Thanks!

rgds,
scchui


Back to top
Tomaz Koritnik
Guest





PostPosted: Sat Mar 19, 2005 2:19 pm    Post subject: Re: example of drawlines in GDIplus? Reply with quote



Hi

To draw lines on form:
- Create a Graphics object from window handle or from its DC (this is
specified in one of many overloaded constructors)
- Create a Pen object and use it to draw lines
- destroy Graphics and Pen object

To draw lines on bitmap is the same, except you have to create Graphics
class from bitmap. If bitmap is GDI bitmap, use it's DC and create Graphics
object from this DC.

regards
Tomaz


"scchui" <nospamplease> wrote

Quote:
Hi,
I am not quite understand the use of Drawlines in GDIplus. Anyone has a
simple example of this in delphi? Thanks!

rgds,
scchui




Back to top
scchui
Guest





PostPosted: Sat Mar 19, 2005 3:46 pm    Post subject: Re: example of drawlines in GDIplus? Reply with quote



Hi,
I mean the DrawLines (not DrawLine) procedure in GDI+. This procedure
required me to use a pointer to points data type. Yesterday I succeeded in
using a static array to pass the points to the procedure. But if I use
Dynamic Array, I don't know how to correctly pass the data. My new problem
is how can I use a Dynamic Array with DrawLines? Thanks for any advice!

Rgds,
scchui


Quote:
Hi

To draw lines on form:
- Create a Graphics object from window handle or from its DC (this is
specified in one of many overloaded constructors)
- Create a Pen object and use it to draw lines
- destroy Graphics and Pen object

To draw lines on bitmap is the same, except you have to create Graphics
class from bitmap. If bitmap is GDI bitmap, use it's DC and create
Graphics object from this DC.

regards
Tomaz




Back to top
Tomaz Koritnik
Guest





PostPosted: Sat Mar 19, 2005 4:41 pm    Post subject: Re: example of drawlines in GDIplus? Reply with quote

Hi

Then, try to pass pointer to the first element in array like @APoints[0].

regards
Tomaz


"scchui" <nospamplease> wrote

Quote:
Hi,
I mean the DrawLines (not DrawLine) procedure in GDI+. This procedure
required me to use a pointer to points data type. Yesterday I succeeded in
using a static array to pass the points to the procedure. But if I use
Dynamic Array, I don't know how to correctly pass the data. My new problem
is how can I use a Dynamic Array with DrawLines? Thanks for any advice!

Rgds,
scchui


Hi

To draw lines on form:
- Create a Graphics object from window handle or from its DC (this is
specified in one of many overloaded constructors)
- Create a Pen object and use it to draw lines
- destroy Graphics and Pen object

To draw lines on bitmap is the same, except you have to create Graphics
class from bitmap. If bitmap is GDI bitmap, use it's DC and create
Graphics object from this DC.

regards
Tomaz






Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.