public static Surface Lookup(IntPtr surface, bool owned)
{
SurfaceType st = NativeMethods.cairo_surface_get_type(surface);
switch (st)
{
case SurfaceType.Image:
return(new ImageSurface(surface, owned));
// case SurfaceType.Xlib:
// return new XlibSurface (surface, owned);
// case SurfaceType.Xcb:
// return new XcbSurface (surface, owned);
// case SurfaceType.Glitz:
// return new GlitzSurface (surface, owned);
// case SurfaceType.Win32:
// return new Win32Surface (surface, owned);
// case SurfaceType.Pdf:
// return new PdfSurface (surface, owned);
// case SurfaceType.PS:
// return new PSSurface (surface, owned);
// case SurfaceType.DirectFB:
// return new DirectFBSurface (surface, owned);
// case SurfaceType.Svg:
// return new SvgSurface (surface, owned);
default:
return(new Surface(surface, owned));
}
}