public static SKSurface Create(SKPixmap pixmap, SKSurfaceProps props) { if (pixmap == null) { throw new ArgumentNullException(nameof(pixmap)); } return(Create(pixmap.Info, pixmap.GetPixels(), pixmap.RowBytes, props)); }
public static SKSurface Create (SKImageInfo info, IntPtr pixels, int rowBytes, SKSurfaceProps props) { return GetObject<SKSurface> (SkiaApi.sk_surface_new_raster_direct (ref info, pixels, (IntPtr)rowBytes, ref props)); }
public static SKSurface Create (int width, int height, SKColorType colorType, SKAlphaType alphaType, IntPtr pixels, int rowBytes, SKSurfaceProps props) => Create (new SKImageInfo (width, height, colorType, alphaType), pixels, rowBytes, props);
public static SKSurface Create(SKImageInfo info, IntPtr pixels, int rowBytes, SKSurfaceProps props) => Create(info, pixels, rowBytes, null, null, new SKSurfaceProperties(props));
public static SKSurface Create(SKImageInfo info, SKSurfaceProps props) => Create(info, 0, new SKSurfaceProperties(props));
public static SKSurface CreateAsRenderTarget(GRContext context, GRBackendTextureDesc desc, SKSurfaceProps props) => CreateAsRenderTarget(context, new GRBackendTexture(desc), desc.Origin, desc.SampleCount, desc.Config.ToColorType(), null, new SKSurfaceProperties(props));
public static SKSurface Create(SKImageInfo info, IntPtr pixels, int rowBytes, SKSurfaceReleaseDelegate releaseProc, object context, SKSurfaceProps props) { var cinfo = SKImageInfoNative.FromManaged(ref info); if (releaseProc == null) { return(GetObject <SKSurface> (SkiaApi.sk_surface_new_raster_direct(ref cinfo, pixels, (IntPtr)rowBytes, IntPtr.Zero, IntPtr.Zero, ref props))); } else { var ctx = new NativeDelegateContext(context, releaseProc); return(GetObject <SKSurface> (SkiaApi.sk_surface_new_raster_direct(ref cinfo, pixels, (IntPtr)rowBytes, releaseDelegate, ctx.NativeContext, ref props))); } }
public static SKSurface Create(SKImageInfo info, SKSurfaceProps props) { var cinfo = SKImageInfoNative.FromManaged(ref info); return(GetObject <SKSurface> (SkiaApi.sk_surface_new_raster(ref cinfo, ref props))); }
public static SKSurface CreateAsRenderTarget(GRContext context, GRBackendTextureDesc desc, SKSurfaceProps props) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var texture = new GRBackendTexture(desc); return(CreateAsRenderTarget(context, texture, desc.Origin, desc.SampleCount, desc.Config.ToColorType(), null, props)); }
public static SKSurface CreateAsRenderTarget(GRContext context, GRBackendTexture texture, SKColorType colorType, SKSurfaceProps props) { return(CreateAsRenderTarget(context, texture, GRSurfaceOrigin.BottomLeft, 0, colorType, null, props)); }
public static SKSurface CreateAsRenderTarget(GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKSurfaceProps props) { return(CreateAsRenderTarget(context, texture, origin, sampleCount, colorType, null, props)); }
// GPU BACKEND TEXTURE AS RENDER TARGET surface public static SKSurface CreateAsRenderTarget(GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, int sampleCount, SKColorType colorType, SKColorSpace colorspace, SKSurfaceProps props) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (texture == null) { throw new ArgumentNullException(nameof(texture)); } var cs = colorspace == null ? IntPtr.Zero : colorspace.Handle; return(GetObject <SKSurface> (SkiaApi.sk_surface_new_backend_texture_as_render_target(context.Handle, texture.Handle, origin, sampleCount, colorType, cs, ref props))); }
public static SKSurface Create(GRContext context, GRBackendTextureDesc desc, SKSurfaceProps props) { var texture = new GRBackendTexture(desc); return(Create(context, texture, desc.Origin, desc.SampleCount, desc.Config.ToColorType(), null, props)); }
public static SKSurface Create(GRContext context, GRBackendTexture texture, GRSurfaceOrigin origin, SKColorType colorType, SKSurfaceProps props) { return(Create(context, texture, origin, 0, colorType, null, props)); }
public static SKSurface Create(GRContext context, GRBackendRenderTarget renderTarget, SKColorType colorType, SKSurfaceProps props) { return(Create(context, renderTarget, GRSurfaceOrigin.BottomLeft, colorType, null, props)); }
public static SKSurface Create (GRContext context, bool budgeted, SKImageInfo info, int sampleCount, SKSurfaceProps props) { return GetObject<SKSurface> (SkiaApi.sk_surface_new_render_target (context.Handle, budgeted, ref info, sampleCount, ref props)); }
public static SKSurface Create(int width, int height, SKColorType colorType, SKAlphaType alphaType, SKSurfaceProps props) => Create(new SKImageInfo(width, height, colorType, alphaType), props);
// GPU NEW surface public static SKSurface Create(GRContext context, bool budgeted, SKImageInfo info, int sampleCount, GRSurfaceOrigin origin, SKSurfaceProps props, bool shouldCreateWithMips) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var cinfo = SKImageInfoNative.FromManaged(ref info); return(GetObject <SKSurface> (SkiaApi.sk_surface_new_render_target(context.Handle, budgeted, ref cinfo, sampleCount, origin, ref props, shouldCreateWithMips))); }
public static SKSurface Create(SKImageInfo info, IntPtr pixels, int rowBytes, SKSurfaceProps props) { var cinfo = SKImageInfoNative.FromManaged(ref info); return(GetObject <SKSurface> (SkiaApi.sk_surface_new_raster_direct(ref cinfo, pixels, (IntPtr)rowBytes, ref props))); }
public static SKSurface Create(GRContext context, bool budgeted, SKImageInfo info, SKSurfaceProps props) { return(Create(context, budgeted, info, 0, GRSurfaceOrigin.BottomLeft, props, false)); }
public static SKSurface Create(GRContext context, GRBackendRenderTargetDesc desc, SKSurfaceProps props) { if (context == null) { throw new ArgumentNullException(nameof(context)); } var renderTarget = new GRBackendRenderTarget(context.Backend, desc); return(Create(context, renderTarget, desc.Origin, desc.Config.ToColorType(), null, new SKSurfaceProperties(props))); }
public static SKSurface Create(SKImageInfo info, SKSurfaceProps props) { return(Create(info, 0, props)); }
public static SKSurface Create(GRContext context, bool budgeted, SKImageInfo info, int sampleCount, SKSurfaceProps props) => Create(context, budgeted, info, sampleCount, GRSurfaceOrigin.BottomLeft, new SKSurfaceProperties(props), false);
public extern static sk_surface_t sk_surface_new_render_target (gr_context_t context, bool budgeted, ref SKImageInfo info, int sampleCount, ref SKSurfaceProps props);
public static SKSurface Create(SKPixmap pixmap, SKSurfaceProps props) => Create(pixmap, new SKSurfaceProperties(props));
public extern static sk_surface_t sk_surface_new_raster(ref SKImageInfo info, ref SKSurfaceProps pros);
public static SKSurface Create (int width, int height, SKColorType colorType, SKAlphaType alphaType, SKSurfaceProps props) => Create (new SKImageInfo (width, height, colorType, alphaType), props);
public extern static sk_surface_t sk_surface_new_raster_direct(ref SKImageInfo info, IntPtr pixels, IntPtr rowBytes, ref SKSurfaceProps props);
public static SKSurface Create (SKImageInfo info, SKSurfaceProps props) { return GetObject<SKSurface> (SkiaApi.sk_surface_new_raster (ref info, ref props)); }
public extern static sk_surface_t sk_surface_new_backend_texture_as_render_target (gr_context_t context, ref GRBackendTextureDesc desc, ref SKSurfaceProps props);
public static SKSurface CreateAsRenderTarget (GRContext context, GRBackendTextureDesc desc, SKSurfaceProps props) { return GetObject<SKSurface> (SkiaApi.sk_surface_new_backend_texture_as_render_target (context.Handle, ref desc, ref props)); }
public static SKSurface Create(GRContext context, GRGlBackendTextureDesc desc, SKSurfaceProps props) { unsafe { var h = desc.TextureHandle; var hPtr = &h; var d = new GRBackendTextureDesc { Flags = desc.Flags, Origin = desc.Origin, Width = desc.Width, Height = desc.Height, Config = desc.Config, SampleCount = desc.SampleCount, TextureHandle = (IntPtr)hPtr, }; return(Create(context, d, props)); } }
public static SKSurface Create(GRContext context, bool budgeted, SKImageInfo info, int sampleCount, SKSurfaceProps props) { var cinfo = SKImageInfoNative.FromManaged(ref info); return(GetObject <SKSurface> (SkiaApi.sk_surface_new_render_target(context.Handle, budgeted, ref cinfo, sampleCount, ref props))); }
public static SKSurface Create(int width, int height, SKColorType colorType, SKAlphaType alphaType, IntPtr pixels, int rowBytes, SKSurfaceProps props) => Create(new SKImageInfo(width, height, colorType, alphaType), pixels, rowBytes, props);
public SKSurfaceProperties(SKSurfaceProps props) : this(props.Flags, props.PixelGeometry) { }
public static SKSurface Create(SKImageInfo info, SKSurfaceProps props) { return(GetObject <SKSurface> (SkiaApi.sk_surface_new_raster(ref info, ref props))); }
public static SKSurface CreateAsRenderTarget(GRContext context, GRBackendTextureDesc desc, SKSurfaceProps props) { return(GetObject <SKSurface> (SkiaApi.sk_surface_new_backend_texture_as_render_target(context.Handle, ref desc, ref props))); }
public static SKSurface Create(SKImageInfo info, IntPtr pixels, int rowBytes, SKSurfaceProps props) { return(Create(info, pixels, rowBytes, null, null, props)); }