[cairo] Lander Game
Behdad Esfahbod
behdad at behdad.org
Mon Jan 8 15:38:06 PST 2007
On Mon, 2007-01-08 at 23:29 +0000, Alex Mac wrote:
>
> > You shouldn't render to an image surface. Do it to a surface
> created
> > using cairo_surface_create_similar(), passing in your destination
> > surface. This way you get a pixmap in the X server instead of a
> local
> > image, so the image does not have to be transferred to the X server
> at
> > all.
>
> that sounds better, but I cant see any way of doing that in pycairo.
> Is it possible for whoever is in charge of pycairo to generate some
> API docs for it?
[behdad at home pango]$ python
import Python 2.4.3 (#1, Oct 23 2006, 14:19:47)
[GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cairo
>>> help (cairo.Surface)
Help on class Surface in module cairo:
class Surface(__builtin__.object)
| Methods defined here:
|
| create_similar(...)
^^^^^^^^^^^^^^^^^^^
It takes the same args as the C API: content, width, height. Use
cairo.CONTENT_COLOR_ALPHA for content.
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo
mailing list