[cairo] Drawing points?

Ian Britten britten at caris.com
Thu Jun 18 10:07:14 PDT 2009


Hi all,
Is there a recommended way of drawing points with Cairo?

I'm interfacing with traditional pen/pixmap drawing techniques, and
am trying to find an optimal match to how some toolkits expect to
be able to draw points.  Specifically:
- The cap style controls whether the point is a dot or square.
- The lineweight controls the radius/size of the point.
- The resulting box/circle is centred over the given point.

I can probably kludge something together with combinations of
cairo_arc()/cairo_rectangle()/etc, but I'm not sure if that'd be
optimal - Both in terms of performance, and for what the various
backends could support natively for drawing points.

Many thanks for any suggestions/info!
Ian



More information about the cairo mailing list