[cairo] Variable width strokes

Seth Nickell snickell at redhat.com
Thu Feb 19 20:54:21 PST 2004


I'm trying to implement a simple sketching application, primarily for
use with a graphics tablet. The final goal is a lightweight application
for designers to do rapid mockups... sort of a whiteboard functionality.

Graphics tablets typically provide two pieces of information in addition
to (x, y) coordinates: pen pressure and pen tilt. I'm ignoring tilt for
now, but its quite important for doing efficient sketches to be able to
vary the line width smoothly by adjusting the pressure you apply to the
pen.

Cairo's strokes render quite pleasingly, but as far as I can tell, you
cannot vary line width mid-stroke. Breaking pen input into line segments
and rendering each line segment as a separate stroke in order to allow
each segment to have a different line width will not look very nice ;-)

Am I missing something or am I hitting a limitation of Cairo's
path/stroke API?

Thanks!

-Seth

-- 
Seth Nickell :: Interaction Designer, Red Hat :: <snickell at redhat.com>






More information about the cairo mailing list