[cairo] Wanted features in Cairo.

Adrian Johnson ajohnson at redneon.com
Thu Jun 28 05:26:26 PDT 2007


Carl Worth wrote:
> And, meanwhile, something we've had on our TODO list for about forever
> is a means to allow the user to provide custom caps of some form or
> another, (for example, arrowheads). But I'm still not entirely sure
> what that support might look like.

One option would be to allow setting the line cap to a path.

eg

cairo_set_line_cap_path (cr, path)
cairo_set_initial_line_cap_path (cr, path)
cairo_set_final_line_cap_path (cr, path)

where the scale and orientation of the path is for a 1 unit wide line
along the y axis with the line end at (0,0). cairo can rotate and scale
the path to the line width and orientation when drawing the caps.

If this option were implemented it would be helpful to have a stroke to
path function so that stroked lines can easily be drawn as part of the cap.

A stroke to path would probably also be required for the PDF backend
when drawing transparent lines with custom caps so that the line and
caps can all be drawn in the one operation.



More information about the cairo mailing list