Beispiel #1
0
            public RenderTargetFixture()
            {
                _factory = Direct2d.CreateFactory(FactoryType.SingleThreaded, DebugLevel.None);

                // Create a memory only copy of the primary monitor DC
                // _dc = Gdi.CreateCompatibleDeviceContext(Gdi.GetDeviceContext());

                _windowClass = new WindowClass(backgroundBrush: BrushHandle.NoBrush);
                _windowClass.Register();
                _window      = _windowClass.CreateWindow("RenderTargetTest");
                RenderTarget = _factory.CreateWindowRenderTarget(default,
Beispiel #2
0
        public void GetDpi()
        {
            IFactory factory = Direct2d.CreateFactory();

            factory.GetDesktopDpi(out float x, out float y);
        }