[Sugar-devel] TA cairo conversion

Walter Bender walter.bender at gmail.com
Sat Nov 5 08:56:15 EDT 2011


I pushed a few more patches last night [1]. I have just two blockers
right now to releasing the Cairo version:

(1) I cannot seem to figure out how to convert my surface to a pixbuf
or png for saving to a file;
        surface = canvas.canvas.get_target()  # get the surface used
by the canvas
        surface.cairo_surface_write_to_png(file_name)  <--- fails
because XlibSurface doesn't have a cairo_surface_write_to_png
attribute
(2) I cannot seem to create the proper surface from a Pixbuf to use in
non-interactive mode in replacement of the canvas surface. I have
unsuccessfully tried to create a pixbuf and use it to source a cairo
context.

The only non-blockers are:
(1) I am struggling with the erratic behavior of rotate on bitmaps. It
is disabled at the moment.
(2) There must be some way to cache the surfaces used by the sprites
instead of re-rendering them from pixbufs each time, but using
get_target() gives X errors.

Any pointers appreciated.

-walter

[1] http://git.sugarlabs.org/~walter/turtleart/walters-cairo/commits/master

-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org


More information about the Sugar-devel mailing list