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)); }
public static IComObject <ID2D1DCRenderTarget> CreateDCRenderTarget(this IComObject <ID2D1Factory> factory, D2D1_RENDER_TARGET_PROPERTIES properties) => CreateDCRenderTarget <ID2D1DCRenderTarget>(factory?.Object, properties);
public static ComObject <T> CreateDCRenderTarget <T>(this ComObject <ID2D1Factory1> factory, D2D1_RENDER_TARGET_PROPERTIES properties) where T : ID2D1DCRenderTarget => CreateDCRenderTarget <T>(factory?.Object, properties);
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);