[cairo] Cairo developers conference call 2004-10-19 18:00 UTC

Carl Worth cworth at cworth.org
Tue Oct 19 08:24:07 PDT 2004

On Mon, 18 Oct 2004 14:39:32 +0530, Ravindra wrote:
> This is a good news for us, as we need customized caps as well. Do you
> think it would be ready by Cairo 1.0 ?

I won't make promises about scheduling. But it is on the TODO list, and
of course anyone is welcome to help.

> GDI+ allows to have three types of DashCaps.

Right now, cairo caps the dashes with the same style as the end points
of the path. This means you have only butt, cap, and square styles
available. Also, the plan above for you to add custom end caps involves
setting butt caps before cairo_stroke_path. This would have the side
effect of disabling the caps on all of the dashes.

So, you would need a mechanism for making custom dashes. I had already
proposed a call that would give you the coordinates of the two end-point
faces. Maybe this call could include the coordinates of all faces
(including the dash faces).

Other ideas?

> Also, GDI+ allows to have different end caps for line and dashes at a
> time. I mean I can have, for example, 'a round cap at line starting end,
> triangle cap for dashes in the line and flat cap at the ending end of
> the line'.

I think I'd like to keep the interface quite simple as it is now, (one
call to set all styles). Then anything more complex can use the custom
cap support that we're discussing.

The principle here is to provide within cairo a few simple cases to
support the majority need, then also provide mechanism for the user to
do full-custom drawing.

> Following link has some images that explain what pattern is it.

Following the principle above, we've already got a couple of simply
gradient styles which cover a large subset of needs, (as evidenced by
PostScript and SVG specifications and usage). The next things I'd like
to add is support for a fully-custom gradient pattern. PathGradient
isn't the thing as it has a single center color. We'll probably want
something more like one of the patch-based approaches from PostScript,
(while following guidance from those that know what OpenGL will be happy

> IIRC, once you guys were talking about adding printing support to Cairo.
> Is anybody working on it ? Is it in your TODO list ? OR you never had
> any such thoughts/plans ?

Printing is a first-class concern in cairo--at least the generation of
the printable graphics stream, (eg. PostScript or PDF). The actual
plumbing for getting those bits to a printer happen outside of cairo.

We do already have a PostScript backend that generates high-quality
results at the expense of generating a big stream--it's just a giant
image rendered with the image backend. More reasonable support for
PDF/PS is definitely on the TODO list. And it's a priority for me to
address this before a 1.0 release, since without this work I'm not sure
we can be confident that the API is solid.


More information about the cairo mailing list