[cairo] Pixel RGB Values...

Bill Spitzak spitzak at gmail.com
Wed Jul 22 14:52:43 PDT 2009


Chris Wilson wrote:

>>> In use, mapping a surface returns an image surface that you can use to
>>> manipulate pixels directly, and unmapping ensures that the changes are
>>> flushed to the backing surface. Internally this works just like
>>> acquire_dest_image()/release_dest_image() but...

How about "cairo_surface_acquire_image()" and 
"cairo_surface_release_image()" as names then?

>> If you don't disable rendering to the surface, then I'm not sure I
>> completely understand the semantics of your proposed map...

I think it would be acceptable to say that results of drawing to the 
original surface during this time the image is acquired are undefined 
(they may be thrown away, they may appear and then be overwritten when 
the image is released, or they may be copied to the image).

If you really want to draw some vectors then make a new cairo_t for the 
acquired surface and use that to draw them.

>>    typedef pixman_format_code_t cairo_wacky_format_t...

Can you explain exactly what extra values you want in "wacky format" 
that would not be useful values where a regular format is wanted? I 
still don't understand the purpose of this.

In any case I would just add them to the normal format enumeration. If 
in fact they make no sense for other surface types then passing them can 
be ignored or cause errors.


More information about the cairo mailing list