[]
Direct2D functions.
public static class D2D1
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
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)
matrix
Matrix3x2The matrix that will be applied subsequently to the geometry being flattened.
dpiX
floatThe horizontal DPI of the render target that the geometry will be rendered onto (a choice of 96 implies no DPI correction).
dpiY
floatThe vertical DPI of the render target that the geometry will be rendered onto (a choice of 96 implies no DPI correction).
maxZoomFactor
floatThe maximum amount of additional scaling (on top of any scaling implied by the matrix or the DPI) that will be applied to the geometry.
The flattening tolerance.
float D2D1ComputeMaximumScaleFactor([In] const D2D_MATRIX_3X2_F* matrix)
public static float ComputeMaximumScaleFactor(ref Matrix3x2 matrix)
matrix
Matrix3x2D2D_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)
sourceColorSpace
ColorSpacedestinationColorSpace
ColorSpacecolor
ColorFHRESULT D2D1CreateDevice([In] IDXGIDevice* dxgiDevice,[In, Optional] const D2D1_CREATION_PROPERTIES* creationProperties,[Out, Fast] ID2D1Device** d2dDevice)
public static Device CreateDevice(Device dxgiDevice, CreationProperties? creationProperties)
dxgiDevice
DevicecreationProperties
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)
dxgiSurface
SurfacecreationProperties
CreationProperties?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)
factoryType
FactoryTyperiid
System.GuidfactoryOptionsRef
FactoryOptions?iFactoryOut
System.IntPtrBOOL D2D1InvertMatrix([InOut] D2D_MATRIX_3X2_F* matrix)
public static bool InvertMatrix(ref Matrix3x2 matrix)
matrix
Matrix3x2BOOL D2D1IsMatrixInvertible([In] const D2D_MATRIX_3X2_F* matrix)
public static bool IsMatrixInvertible(ref Matrix3x2 matrix)
matrix
Matrix3x2void D2D1SinCos([In] float angle,[Out] float* s,[Out] float* c)
public static void SinCos(float angle, out float s, out float c)
angle
floats
floatc
floatfloat D2D1Vec3Length([In] float x,[In] float y,[In] float z)
public static float Vec3Length(float x, float y, float z)
x
floaty
floatz
float