using System;
using System.Drawing;
using CC_Functions.W32.Native;
namespace CC_Functions.W32.DCDrawer
{
public class DCUnbuffered : IDCDrawer
private readonly IntPtr hWnd;
private readonly IntPtr ptr;
public DCUnbuffered(IntPtr ptr, IntPtr hWnd)
this.ptr = ptr;
this.hWnd = hWnd;
Graphics = Graphics.FromHdc(ptr);
}
public DCUnbuffered(IntPtr ptr)
hWnd = IntPtr.Zero;
public Graphics Graphics { get; }
public void Dispose()
Graphics.Dispose();
user32.ReleaseDC(hWnd, ptr);