GDI+ Dashed line
-
Does anyone know how I can draw a dashed or dotted line. I dont seem to be able to get amywhere using System.Drawing.Graphics short of drawing lots of little line. This can be right. tia gadget www.FUXUP.com[^]
You set it in the
Pen
that you use to draw (the first parameter in all overloadedGraphics.DrawLine
methods). There are many properties (mostly,DashStyle
) that you can set to do dashed lines, and dictate the frequency, length, etc. of those lines.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
-
You set it in the
Pen
that you use to draw (the first parameter in all overloadedGraphics.DrawLine
methods). There are many properties (mostly,DashStyle
) that you can set to do dashed lines, and dictate the frequency, length, etc. of those lines.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
If you still have any questions about what all the options are you can check the following article out on the MSDN. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdrawingpenclasstopic.asp
-
You set it in the
Pen
that you use to draw (the first parameter in all overloadedGraphics.DrawLine
methods). There are many properties (mostly,DashStyle
) that you can set to do dashed lines, and dictate the frequency, length, etc. of those lines.-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----