[cairo] New little cairo demo
Kristian Høgsberg
krh at bitplanet.net
Sat Jan 22 22:35:10 PST 2005
Hi,
I was playing around with cairo and came up with this little example. I
though it might be interesting to add to cairo-demos or something.
I was wondering, though, about the cairo_current_path() and
cairo_current_path_flat() functions. Don't you typically want to start
a new path when you call these functions? What I'm doing in this
example is to call cairo_new_path() in the first callback and then set a
flag in the closure. This is also what the warpedtext.py [1] example
from the pycairo module does. One suggestion is to add a flag to the
API to clear the path before doing the callbacks, another is to just
always do this. My gut feeling is that the "call new_path and set a
flag" will be a common pattern with this interface and could be avoided
with a little tweaking.
cheers,
Kristian
[1]
http://cvs.freedesktop.org/cairo/pycairo/examples/warpedtext.py?rev=1.1&view=auto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kapow.png
Type: image/png
Size: 33708 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050123/09ec15c5/kapow.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kapow.tar.gz
Type: application/x-gzip
Size: 1632 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050123/09ec15c5/kapow.tar.bin
More information about the cairo
mailing list