June 2002
Intermediate to advanced
864 pages
18h 35m
English
Vector graphics deals with drawing geometric shapes such as lines, curves, and polygons. In this section we illustrate vector graphics in GDI+ with an interactive drawing program. Later in the chapter we will introduce raster graphics and bitmaps.
Our sample program, DrawDemo, allows you to draw a picture consisting of rectangles and ellipses of various sizes, colors, and patterns. The program illustrates both standard painting (implemented by an override of OnPaint) and “rubber-band” drawing, in which a shape is temporarily outlined as the mouse is moved. We also illustrate use of a clipping rectangle, which can make for more efficient drawing.
Version 1 of DrawDemo illustrates drawing a single rectangle. ...
Read now
Unlock full access