[cairo] How should bindings deal with surfaces of unknown type?
behdad at behdad.org
Sun Oct 7 09:41:12 PDT 2007
On Sun, 2007-10-07 at 09:05 -0400, 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.
> Is there a way to solve this problem?
Wanted to bring it on. It's crashing on my with Python bindings right
now. I think the way we want to go is to have a generic cairo_surface_t
object associated to these kind of surfaces. I know most bindings
probably define that class abstract... No other idea.
"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