[]
ID2D1Factory1
[Guid("bb12d362-daee-4b9a-aa1d-14ba401cfa1f")]
public class Factory1 : Factory, IDisposable, IUnknown
Initializes a new instance of the Factory1 class.
public Factory1(IntPtr nativePtr)
nativePtr
System.IntPtrThe native pointer.
Gets a value indicating if Direct2D is supported on this platform.
public bool IsSupported { get; }
Get the effects registered
public Guid[] RegisteredEffects { get; }
Default Constructor for a Factory1.
public static Factory1 Create(FactoryType factoryType)
factoryType
FactoryTypeHRESULT ID2D1Factory1::CreateDevice([In] IDXGIDevice* dxgiDevice,[Out, Fast] ID2D1Device** d2dDevice)
public Device CreateDevice(Device dxgiDevice)
dxgiDevice
DeviceHRESULT ID2D1Factory1::CreateDrawingStateBlock([In, Optional] const D2D1_DRAWING_STATE_DESCRIPTION1* drawingStateDescription,[In, Optional] IDWriteRenderingParams* textRenderingParams,[Out, Fast] ID2D1DrawingStateBlock1** drawingStateBlock)
public DrawingStateBlock1 CreateDrawingStateBlock1(DrawingStateDescription1? drawingStateDescription, RenderingParams textRenderingParams)
drawingStateDescription
DrawingStateDescription1?textRenderingParams
RenderingParamsCreates a new GdiMetafile object that you can use to replay metafile content.
public GdiMetafile CreateGdiMetafile(Stream stream)
stream
System.IO.StreamHRESULT ID2D1Factory1::CreatePathGeometry([Out, Fast] ID2D1PathGeometry1** pathGeometry)
public PathGeometry1 CreatePathGeometry1()
HRESULT ID2D1Factory1::CreateStrokeStyle([In] const D2D1_STROKE_STYLE_PROPERTIES1* strokeStyleProperties,[In, Buffer, Optional] const float* dashes,[In] unsigned int dashesCount,[Out, Fast] ID2D1StrokeStyle1** strokeStyle)
public StrokeStyle1 CreateStrokeStyle1(ref StrokeStyleProperties1 strokeStyleProperties, float[] dashes)
strokeStyleProperties
StrokeStyleProperties1dashes
float[]HRESULT ID2D1Factory1::CreateStrokeStyle([In] const D2D1_STROKE_STYLE_PROPERTIES1* strokeStyleProperties,[In, Buffer, Optional] const float* dashes,[In] unsigned int dashesCount,[Out, Fast] ID2D1StrokeStyle1** strokeStyle)
public StrokeStyle1 CreateStrokeStyle1(ref StrokeStyleProperties1 strokeStyleProperties)
strokeStyleProperties
StrokeStyleProperties1Clean up any resources being used.
protected override void Dispose(bool disposing)
disposing
boolHRESULT ID2D1Factory1::GetEffectProperties([In] const GUID& effectId,[Out] ID2D1Properties** properties)
public Properties GetEffectProperties(Guid effectId)
effectId
System.GuidHRESULT ID2D1Factory1::GetRegisteredEffects([Out, Buffer, Optional] GUID* effects,[In] unsigned int effectsCount,[Out, Optional] unsigned int* effectsReturned,[Out, Optional] unsigned int* effectsRegistered)
public void GetRegisteredEffects(Guid[] effects, int effectsCount, out int effectsReturned, out int effectsRegistered)
effects
System.Guid[]effectsCount
inteffectsReturned
inteffectsRegistered
intRegister a ICustomEffect.
public CustomEffectFactory RegisterEffect<T>(out bool wasActuallyRegistered) where T : ICustomEffect, new()
wasActuallyRegistered
boolT
Register a ICustomEffect factory.
public CustomEffectFactory RegisterEffect<T>(Func<T> effectFactory, Guid effectId) where T : ICustomEffect
effectFactory
System.Func<TResult><T>effectId
System.GuidT
Register a ICustomEffect factory.
public CustomEffectFactory RegisterEffect<T>(Func<T> effectFactory) where T : ICustomEffect
effectFactory
System.Func<TResult><T>T
Register a ICustomEffect.
public CustomEffectFactory RegisterEffect<T>(Guid effectId, out bool wasActuallyRegistered) where T : ICustomEffect, new()
effectId
System.GuidwasActuallyRegistered
boolT
HRESULT ID2D1Factory1::RegisterEffectFromString([In] const GUID& classId,[In] const wchar_t* propertyXml,[In, Buffer, Optional] const D2D1_PROPERTY_BINDING* bindings,[In] unsigned int bindingsCount,[In] const __function__stdcall* effectFactory)
public void RegisterEffectFromString(Guid classId, string ropertyXmlRef, PropertyBinding[] bindings, int bindingsCount, FunctionCallback effectFactory)
classId
System.GuidropertyXmlRef
stringbindings
PropertyBinding[]bindingsCount
inteffectFactory
FunctionCallbackHRESULT ID2D1Factory1::UnregisterEffect([In] const GUID& classId)
public void UnregisterEffect(Guid classId)
classId
System.GuidUnregister a ICustomEffect.
public void UnregisterEffect<T>() where T : ICustomEffect
T
Performs an explicit conversion from System.IntPtr to Factory1.
public static explicit operator Factory1(IntPtr nativePointer)
nativePointer
System.IntPtr