 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
scchui Guest
|
Posted: Thu Mar 17, 2005 3:16 pm Post subject: example of drawlines in GDIplus? |
|
|
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
|
Posted: Sat Mar 19, 2005 2:19 pm Post subject: Re: example of drawlines in GDIplus? |
|
|
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
|
Posted: Sat Mar 19, 2005 3:46 pm Post subject: Re: example of drawlines in GDIplus? |
|
|
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
|
Posted: Sat Mar 19, 2005 4:41 pm Post subject: Re: example of drawlines in GDIplus? |
|
|
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 |
|
 |
|
|
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
|
|