[cairo] How should bindings deal with surfaces of unknown type?
Torsten Schoenfeld
kaffeetisch at gmx.de
Sat Dec 29 05:51:14 PST 2007
On Sun, 2007-10-07 at 15:05 +0200, Torsten Schoenfeld wrote:
> 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.
This problem still persists and I still don't know how to handle it.
How do other bindings deal with this situation? What do you do with a
surface pointer for which cairo_surface_get_type returns an internal and
thus unknown value?
--
Bye,
-Torsten
More information about the cairo
mailing list