[cairo] How should bindings deal with surfaces of unknown type?

Torsten Schoenfeld kaffeetisch at gmx.de
Sun Oct 7 06:05:21 PDT 2007


Aloha,

when you cairo_surface_create_similar on, say, a PDF surface, you get a
surface of type CAIRO_INTERNAL_SURFACE_TYPE_META.  But since that's
internal, all you see is a surface of type 4096.  When language bindings
encounter such a surface, they have little choice but to represent it as
a generic surface.  Thus, you can't call PDF specific surface methods on
the result of calling create_similar on a PDF surface.

Is there a way to solve this problem?

-- 
Bye,
-Torsten



More information about the cairo mailing list