예제 #1
0
        public static ComObject <T> CreateDCRenderTarget <T>(this ID2D1Factory1 factory, D2D1_RENDER_TARGET_PROPERTIES properties) where T : ID2D1DCRenderTarget
        {
            if (factory == null)
            {
                throw new ArgumentNullException(nameof(factory));
            }

            factory.CreateDCRenderTarget(ref properties, out var target).ThrowOnError();
            return(new ComObject <T>((T)target));
        }
예제 #2
0
 public static IComObject <ID2D1DCRenderTarget> CreateDCRenderTarget(this IComObject <ID2D1Factory> factory, D2D1_RENDER_TARGET_PROPERTIES properties) => CreateDCRenderTarget <ID2D1DCRenderTarget>(factory?.Object, properties);
예제 #3
0
 public static ComObject <T> CreateDCRenderTarget <T>(this ComObject <ID2D1Factory1> factory, D2D1_RENDER_TARGET_PROPERTIES properties) where T : ID2D1DCRenderTarget => CreateDCRenderTarget <T>(factory?.Object, properties);
예제 #4
0
 public static IComObject <T> CreateDxgiSurfaceRenderTarget <T>(this IComObject <ID2D1Factory1> factory, IComObject <IDXGISurface> surface, D2D1_RENDER_TARGET_PROPERTIES properties) where T : ID2D1RenderTarget => CreateDxgiSurfaceRenderTarget <T>(factory?.Object, surface?.Object, properties);