public D2DGraphics(SharpDX.WIC.Bitmap wicBitmap) { renderTargetMode = RenderTargetMode.WIC; CreateDeviceIndependentResource(); this.wicBitmap = wicBitmap; CreateDeviceDependentResource(); }
public D2DGraphics(Control control) { renderTargetMode = RenderTargetMode.HWND; CreateDeviceIndependentResource(); if (control.Width <= 0 || control.Height <= 0) { return; } this.control = control; CreateDeviceDependentResource(); }