public static SKCanvas Create(SKRect bounds, SKWStream stream) { if (stream == null) { throw new ArgumentNullException(nameof(stream)); } return(SKObject.Referenced(SKCanvas.GetObject(SkiaApi.sk_svgcanvas_create_with_stream(&bounds, stream.Handle)), stream)); }
public static SKCanvas Create(SKRect bounds, SKXmlWriter writer) { if (writer == null) { throw new ArgumentNullException(nameof(writer)); } return(SKObject.Referenced(SKCanvas.GetObject(SkiaApi.sk_svgcanvas_create_with_writer(&bounds, writer.Handle)), writer)); }
public static SKCanvas Create(SKRect bounds, SKWStream stream) { if (stream == null) { throw new ArgumentNullException(nameof(stream)); } // TODO: there seems to be a memory issue with things getting destroyed in the incorrect order //return SKObject.Referenced (SKObject.GetObject<SKCanvas> (SkiaApi.sk_svgcanvas_create_with_stream (&bounds, stream.Handle)), stream); var writer = new SKXmlStreamWriter(stream); return(SKObject.Owned(SKCanvas.GetObject(SkiaApi.sk_svgcanvas_create_with_writer(&bounds, writer.Handle)), writer)); }
private static void DrawInternal(IntPtr d, void *context, IntPtr canvas) { var drawable = DelegateProxies.GetUserData <SKDrawable> ((IntPtr)context, out _); drawable.OnDraw(SKCanvas.GetObject(canvas, false)); }
public SKCanvas BeginRecording(SKRect cullRect) { return(OwnedBy(SKCanvas.GetObject(SkiaApi.sk_picture_recorder_begin_recording(Handle, &cullRect), false), this)); }
public SKCanvas BeginPage(float width, float height, SKRect content) => OwnedBy(SKCanvas.GetObject(SkiaApi.sk_document_begin_page(Handle, width, height, &content), false), this);