Drawing Filled Areas
The next step up from drawing lines is filling enclosed areas. Windows’ seven functions for drawing filled areas with borders are listed in the table below.
Function | Figure |
|---|---|
Rectangle | Rectangle with square corners |
Ellipse | Ellipse |
RoundRect | Rectangle with rounded corners |
Chord | Arc on the circumference of an ellipse with endpoints connected by a chord |
Pie | Pie wedge defined by the circumference of an ellipse |
Polygon | Multisided figure |
PolyPolygon | Multiple multisided figures |
Windows draws the outline of the figure with the current pen selected in the device context. The current background mode, background color, and drawing mode are all used for this outline, just as if Windows were drawing a line. Everything we learned about lines also ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access