Drawing Graphics: 2.7 Shapes: Rounded Rectangles

Up: GEOS SDK TechDocs| Up | Prev: 2.6 Three-Point Arcs | Next: 2.8 Polylines and Polygons
GrDrawRoundRect(), GrDrawRoundRectTo(), GrFillRoundRect(), GrFillRoundRectTo()

Rounded rectangles are defined in terms of their bounding rectangle and the radius of the circle used to compute the rounded corners. The smaller the corner circle is, the sharper the rectangle's corners will be. A larger corner circle results in a more rounded corner with more area taken away.

GrDrawRoundRect() draws the outline of a rounded rectangle with the passed bounding rectangle and corner circle dimensions. The drawing position is set to the first passed coordinate pair. GrDrawRoundRectTo() draws the outline of the rounded rectangle for which the current position is one corner of the bounding rectangle. The current position is unaffected by this operation. GrDrawRoundRect() and GrDrawRoundRectTo() use the current line drawing attributes. GrFillRoundRect() fills a rounded rectangle with passed bounding rectangle and corner radius using the current area attributes. GrFillRoundRectTo() fills a rounded rectangle that has the current position as one corner of the bounding rectangle.


Up: GEOS SDK TechDocs| Up | Prev: 2.6 Three-Point Arcs | Next: 2.8 Polylines and Polygons