From 52a77ff19546f17c0aa028c9972aec90d0346ba2 Mon Sep 17 00:00:00 2001 From: Habib Rehman <13956188+habibrehmansg@users.noreply.github.com> Date: Tue, 26 Nov 2024 12:22:18 +0800 Subject: [PATCH] Set D2DGraphic' D2DDevice handle automatically for memory bitmap to draw paths correctly --- src/D2DLibExport/D2DGraphics.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/D2DLibExport/D2DGraphics.cs b/src/D2DLibExport/D2DGraphics.cs index c872214ca..92ca77dbd 100644 --- a/src/D2DLibExport/D2DGraphics.cs +++ b/src/D2DLibExport/D2DGraphics.cs @@ -31,7 +31,7 @@ public class D2DGraphics { internal HANDLE Handle { get; } - public D2DDevice? Device { get; } + public D2DDevice Device { get; } public D2DGraphics(D2DDevice context) : this(context.Handle) @@ -42,7 +42,8 @@ public D2DGraphics(D2DDevice context) public D2DGraphics(HANDLE handle) { this.Handle = handle; - } + this.Device = new D2DDevice(handle); + } public void BeginRender() {