Method CreateStrokedGeometryRealization
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
CreateStrokedGeometryRealization(IGeometry, float, IStrokeStyle?, float?)
Creates a device-dependent representation of the stroke of a geometry that can be subsequently rendered.
IGeometryRealization CreateStrokedGeometryRealization(IGeometry geometry, float strokeWidth = 1, IStrokeStyle? strokeStyle = null, float? flatteningTolerance = null)
Parameters
geometry
IGeometryThe geometry to realize.
strokeWidth
floatThe width of the stroke. This parameter shares the same units as the coordinates of the geometry.
strokeStyle
IStrokeStyleThe stroke style.
flatteningTolerance
float?The flattening tolerance to use when converting Beziers to line segments. This parameter shares the same units as the coordinates of the geometry. If null, Default will be used.
Returns
- IGeometryRealization
The new geometry realization object.
Remarks
This method is used in conjunction with DrawGeometryRealization(IGeometryRealization, IDeviceBrush). The Compute(in Matrix3x2Float, Vector2Float, float) helper API may be used to determine the proper flattening tolerance.
If the provided stroke style specifies a stroke transform type other than Normal, then the stroke will be realized assuming the identity transform and a DPI of 96.