Hello, Herfried:
I don't know how GDI+ is internally optimized but, don't you think DrawLine consumes less process time than FillRectangle for the same purpose? Ok, I know that for a single dot it's not important, but it could be for a large number of dots.
Does anybody know why doesn't exist a DrawPoint function? Or a DrawMarker?
Regards.
"Herfried K. Wagner [MVP]" <
[email protected]> escribió en el mensaje | "MC D" <
[email protected]> scripsit:
| > Ok, dumb question, but how do you draw a single point in gdi? I thought you
| > could use the .DrawLine method and just specify the same start and end
| > point, but that does nothing. In otherwords, if I have:
| >
| > g.DrawLine(myPen,x,y,x,y)
| >
| > nothing happens. I can have:
| >
| > g.DrawLine(myPen,x,y,x+1,y+1)
| >
| > and I can see what I am wanting, but obviously it's kinda' wierd-ish. So
| > how do you draw an individual point? (DrawElipse has the same problem).
|
| \\\
| Private Sub Form1_Paint( _
| ByVal sender As Object, _
| ByVal e As System.Windows.Forms.PaintEventArgs _
| ) Handles MyBase.Paint
| e.Graphics.FillRectangle( _
| Brushes.Red, _
| New Rectangle(100, 100, 1, 1) _
| )
| End Sub
| ///
|
| --
| Herfried K. Wagner
| MVP · VB Classic, VB.NET
| <
http://www.mvps.org/dotnet>