Cairo.Surface.Lookup C# (CSharp) Метод

Lookup() публичный статический Метод

public static Lookup ( IntPtr surface, bool owned ) : Surface
surface System.IntPtr
owned bool
Результат Surface
        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);
            }
        }

Usage Example

Пример #1
0
        public Surface GetGroupTarget()
        {
            CheckDisposed();
            IntPtr surface = NativeMethods.cairo_get_group_target(handle);

            return(Surface.Lookup(surface, false));
        }
All Usage Examples Of Cairo.Surface::Lookup