[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct2D.D2D1

Class D2D1

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

Direct2D functions.

public static class D2D1
Inheritance
object
D2D1
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Fields

DefaultFlatteningTolerance

The default tolerance for geometric flattening operations. http://msdn.microsoft.com/en-us/library/windows/desktop/dd370975%28v=vs.85%29.aspx

public const float DefaultFlatteningTolerance = 0.25

Field Value

float

Methods

ComputeFlatteningTolerance(ref Matrix3x2, float, float, float)

Computes the appropriate flattening tolerance to pass to APIs that take a flattening tolerance (for instance, DeviceContext.CreateFilledGeometryRealization).

public static float ComputeFlatteningTolerance(ref Matrix3x2 matrix, float dpiX = 96, float dpiY = 96, float maxZoomFactor = 1)

Parameters

matrix Matrix3x2

The matrix that will be applied subsequently to the geometry being flattened.

dpiX float

The horizontal DPI of the render target that the geometry will be rendered onto (a choice of 96 implies no DPI correction).

dpiY float

The vertical DPI of the render target that the geometry will be rendered onto (a choice of 96 implies no DPI correction).

maxZoomFactor float

The maximum amount of additional scaling (on top of any scaling implied by the matrix or the DPI) that will be applied to the geometry.

Returns

float

The flattening tolerance.

ComputeMaximumScaleFactor(ref Matrix3x2)

float D2D1ComputeMaximumScaleFactor([In] const D2D_MATRIX_3X2_F* matrix)

public static float ComputeMaximumScaleFactor(ref Matrix3x2 matrix)

Parameters

matrix Matrix3x2

Returns

float

ConvertColorSpace(ColorSpace, ColorSpace, ColorF)

D2D_COLOR_F D2D1ConvertColorSpace([In] D2D1_COLOR_SPACE sourceColorSpace,[In] D2D1_COLOR_SPACE destinationColorSpace,[In] const D2D_COLOR_F* color)

public static ColorF ConvertColorSpace(ColorSpace sourceColorSpace, ColorSpace destinationColorSpace, ColorF color)

Parameters

sourceColorSpace ColorSpace
destinationColorSpace ColorSpace
color ColorF

Returns

ColorF

CreateDevice(Device, CreationProperties?)

HRESULT D2D1CreateDevice([In] IDXGIDevice* dxgiDevice,[In, Optional] const D2D1_CREATION_PROPERTIES* creationProperties,[Out, Fast] ID2D1Device** d2dDevice)

public static Device CreateDevice(Device dxgiDevice, CreationProperties? creationProperties)

Parameters

dxgiDevice Device
creationProperties CreationProperties?

Returns

Device

CreateDeviceContext(Surface, CreationProperties?)

HRESULT D2D1CreateDeviceContext([In] IDXGISurface* dxgiSurface,[In, Optional] const D2D1_CREATION_PROPERTIES* creationProperties,[Out, Fast] ID2D1DeviceContext** d2dDeviceContext)

public static DeviceContext CreateDeviceContext(Surface dxgiSurface, CreationProperties? creationProperties)

Parameters

dxgiSurface Surface
creationProperties CreationProperties?

Returns

DeviceContext

CreateFactory(FactoryType, Guid, FactoryOptions?, out IntPtr)

HRESULT D2D1CreateFactory([In] D2D1_FACTORY_TYPE factoryType,[In] const GUID& riid,[In, Optional] const D2D1_FACTORY_OPTIONS* pFactoryOptions,[Out] void** ppIFactory)

public static bool CreateFactory(FactoryType factoryType, Guid riid, FactoryOptions? factoryOptionsRef, out IntPtr iFactoryOut)

Parameters

factoryType FactoryType
riid System.Guid
factoryOptionsRef FactoryOptions?
iFactoryOut System.IntPtr

Returns

bool

InvertMatrix(ref Matrix3x2)

BOOL D2D1InvertMatrix([InOut] D2D_MATRIX_3X2_F* matrix)

public static bool InvertMatrix(ref Matrix3x2 matrix)

Parameters

matrix Matrix3x2

Returns

bool

IsMatrixInvertible(ref Matrix3x2)

BOOL D2D1IsMatrixInvertible([In] const D2D_MATRIX_3X2_F* matrix)

public static bool IsMatrixInvertible(ref Matrix3x2 matrix)

Parameters

matrix Matrix3x2

Returns

bool

SinCos(float, out float, out float)

void D2D1SinCos([In] float angle,[Out] float* s,[Out] float* c)

public static void SinCos(float angle, out float s, out float c)

Parameters

angle float
s float
c float

Vec3Length(float, float, float)

float D2D1Vec3Length([In] float x,[In] float y,[In] float z)

public static float Vec3Length(float x, float y, float z)

Parameters

x float
y float
z float

Returns

float