//----------------------------------------------------------------------
        #region ** device independent resources

        bool CreateDeviceIndependentResources()
        {
            _d2dFactory = D2D.Factory1.Create(D2D.FactoryType.SingleThreaded);
            if (!_d2dFactory.IsSupported)
            {
                return(false);
            }
            _d2dFactory.GetDesktopDpi(out _dpiX, out _dpiY);
            var ssp = new D2D.StrokeStyleProperties();

            ssp.StartCap     = D2D.CapStyle.Round;
            ssp.EndCap       = D2D.CapStyle.Triangle;
            _lineStrokeStyle = D2D.StrokeStyle.Create(_d2dFactory, ref ssp);
            _wicFactory      = WIC.ImagingFactory2.Create();
            return(true);
        }
Exemple #2
0
 void CreateDeviceIndependentResources()
 {
     _d2dFactory = D2D.Factory2.Create(D2D.FactoryType.SingleThreaded);
     _wicFactory = WIC.ImagingFactory2.Create();
 }