示例#1
0
        public D2DGraphics(SharpDX.WIC.Bitmap wicBitmap)
        {
            renderTargetMode = RenderTargetMode.WIC;

            CreateDeviceIndependentResource();

            this.wicBitmap = wicBitmap;
            CreateDeviceDependentResource();
        }
示例#2
0
        public D2DGraphics(Control control)
        {
            renderTargetMode = RenderTargetMode.HWND;

            CreateDeviceIndependentResource();

            if (control.Width <= 0 || control.Height <= 0)
            {
                return;
            }

            this.control = control;

            CreateDeviceDependentResource();
        }