This topic provides examples that demonstrate how to draw a single pixel and how to draw a point with a pen three-pixels wide.
Use Plot()
to draw a single point in the center of the screen.
... TPoint screenCenterPoint=rect.Center(); // the center of the screen ... // draw a single pixel point in the center of the screen gc.Plot(screenCenterPoint); ...
Define a size for the pen tip as a TSize
.
Use SetPenSize()
to increase the pen width from the default (single pixel). This shows how a plotted point three pixels wide is much easier to see than a single pixel. It is in fact drawn as a "+" shape.
Use Plot()
to draw a point in the center of the screen.
... TPoint screenCenterPoint=rect.Center(); // the center of the screen ... // Set up a "bold" size for the pen tip to (default is 1,1) TSize penSizeBold(3,3); ... // draw a "bold" point 3 pixels across gc.SetPenSize(penSizeBold); gc.Plot(screenCenterPoint); ...