[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct2D.Factory1

Class Factory1

Namespace
GrapeCity.Documents.DX.Direct2D
Assembly
GcDocs.DX.Windows.dll

ID2D1Factory1

[Guid("bb12d362-daee-4b9a-aa1d-14ba401cfa1f")]
public class Factory1 : Factory, IDisposable, IUnknown
Inheritance
object
Factory1
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Factory1(IntPtr)

Initializes a new instance of the Factory1 class.

public Factory1(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Properties

IsSupported

Gets a value indicating if Direct2D is supported on this platform.

public bool IsSupported { get; }

Property Value

bool

RegisteredEffects

Get the effects registered

public Guid[] RegisteredEffects { get; }

Property Value

System.Guid[]

Methods

Create(FactoryType)

Default Constructor for a Factory1.

public static Factory1 Create(FactoryType factoryType)

Parameters

factoryType FactoryType

Returns

Factory1

CreateDevice(Device)

HRESULT ID2D1Factory1::CreateDevice([In] IDXGIDevice* dxgiDevice,[Out, Fast] ID2D1Device** d2dDevice)

public Device CreateDevice(Device dxgiDevice)

Parameters

dxgiDevice Device

Returns

Device

CreateDrawingStateBlock1(DrawingStateDescription1?, RenderingParams)

HRESULT 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)

Parameters

drawingStateDescription DrawingStateDescription1?
textRenderingParams RenderingParams

Returns

DrawingStateBlock1

CreateGdiMetafile(Stream)

Creates a new GdiMetafile object that you can use to replay metafile content.

public GdiMetafile CreateGdiMetafile(Stream stream)

Parameters

stream System.IO.Stream

Returns

GdiMetafile

CreatePathGeometry1()

HRESULT ID2D1Factory1::CreatePathGeometry([Out, Fast] ID2D1PathGeometry1** pathGeometry)

public PathGeometry1 CreatePathGeometry1()

Returns

PathGeometry1

CreateStrokeStyle1(ref StrokeStyleProperties1, 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, float[] dashes)

Parameters

strokeStyleProperties StrokeStyleProperties1
dashes float[]

Returns

StrokeStyle1

CreateStrokeStyle1(ref StrokeStyleProperties1)

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)

Parameters

strokeStyleProperties StrokeStyleProperties1

Returns

StrokeStyle1

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

GetEffectProperties(Guid)

HRESULT ID2D1Factory1::GetEffectProperties([In] const GUID& effectId,[Out] ID2D1Properties** properties)

public Properties GetEffectProperties(Guid effectId)

Parameters

effectId System.Guid

Returns

Properties

GetRegisteredEffects(Guid[], int, out int, out int)

HRESULT 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)

Parameters

effects System.Guid[]
effectsCount int
effectsReturned int
effectsRegistered int

RegisterEffect<T>(out bool)

Register a ICustomEffect.

public CustomEffectFactory RegisterEffect<T>(out bool wasActuallyRegistered) where T : ICustomEffect, new()

Parameters

wasActuallyRegistered bool

Returns

CustomEffectFactory

Type Parameters

T

RegisterEffect<T>(Func<T>, Guid)

Register a ICustomEffect factory.

public CustomEffectFactory RegisterEffect<T>(Func<T> effectFactory, Guid effectId) where T : ICustomEffect

Parameters

effectFactory System.Func<TResult><T>
effectId System.Guid

Returns

CustomEffectFactory

Type Parameters

T

RegisterEffect<T>(Func<T>)

Register a ICustomEffect factory.

public CustomEffectFactory RegisterEffect<T>(Func<T> effectFactory) where T : ICustomEffect

Parameters

effectFactory System.Func<TResult><T>

Returns

CustomEffectFactory

Type Parameters

T

RegisterEffect<T>(Guid, out bool)

Register a ICustomEffect.

public CustomEffectFactory RegisterEffect<T>(Guid effectId, out bool wasActuallyRegistered) where T : ICustomEffect, new()

Parameters

effectId System.Guid
wasActuallyRegistered bool

Returns

CustomEffectFactory

Type Parameters

T

RegisterEffectFromString(Guid, string, PropertyBinding[], int, FunctionCallback)

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)

Parameters

classId System.Guid
ropertyXmlRef string
bindings PropertyBinding[]
bindingsCount int
effectFactory FunctionCallback

UnregisterEffect(Guid)

HRESULT ID2D1Factory1::UnregisterEffect([In] const GUID& classId)

public void UnregisterEffect(Guid classId)

Parameters

classId System.Guid

UnregisterEffect<T>()

Unregister a ICustomEffect.

public void UnregisterEffect<T>() where T : ICustomEffect

Type Parameters

T

Operators

explicit operator Factory1(IntPtr)

Performs an explicit conversion from System.IntPtr to Factory1.

public static explicit operator Factory1(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

Factory1