Class Geometry
[Guid("2cd906a1-12e2-11dc-9fed-001143a055f9")]
public class Geometry : Resource
- Inheritance
-
Geometry
- Derived
- Inherited Members
Constructors
Geometry(nint)
public Geometry(nint nativePtr)
Parameters
nativePtr
nint
Fields
DefaultFlatteningTolerance
Default flattening tolerance used for all methods that are not explicitly using it. Default is set to 0.25f.
public const float DefaultFlatteningTolerance = 0.25
Field Value
Properties
FlatteningTolerance
Get or set the default flattening tolerance used for all methods that are not explicitly using it. Default is set to 0.25f.
public float FlatteningTolerance { get; set; }
Property Value
Methods
Combine(Geometry, CombineMode, GeometrySink)
Combines this geometry with the specified geometry and stores the result in an SimplifiedGeometrySink.
public void Combine(Geometry inputGeometry, CombineMode combineMode, GeometrySink geometrySink)
Parameters
inputGeometry
GeometryThe geometry to combine with this instance.
combineMode
CombineModeThe type of combine operation to perform.
geometrySink
GeometrySinkThe result of the combine operation.
Combine(Geometry, CombineMode, RawMatrix3x2?, float, SimplifiedGeometrySink)
Combines this geometry with the specified geometry and stores the result in an SimplifiedGeometrySink.
public void Combine(Geometry inputGeometry, CombineMode combineMode, RawMatrix3x2? inputGeometryTransform, float flatteningTolerance, SimplifiedGeometrySink geometrySink)
Parameters
inputGeometry
GeometryNo documentation.
combineMode
CombineModeNo documentation.
inputGeometryTransform
RawMatrix3x2?No documentation.
flatteningTolerance
floatNo documentation.
geometrySink
SimplifiedGeometrySinkNo documentation.
Combine(Geometry, CombineMode, float, GeometrySink)
Combines this geometry with the specified geometry and stores the result in an SimplifiedGeometrySink.
public void Combine(Geometry inputGeometry, CombineMode combineMode, float flatteningTolerance, GeometrySink geometrySink)
Parameters
inputGeometry
GeometryThe geometry to combine with this instance.
combineMode
CombineModeThe type of combine operation to perform.
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometries. Smaller values produce more accurate results but cause slower execution.
geometrySink
GeometrySinkThe result of the combine operation.
Compare(Geometry)
Describes the intersection between this geometry and the specified geometry. The comparison is performed by using the specified flattening tolerance.
public GeometryRelation Compare(Geometry inputGeometry)
Parameters
inputGeometry
GeometryThe geometry to test.
Returns
- GeometryRelation
When this method returns, contains a reference to a value that describes how this geometry is related to inputGeometry. You must allocate storage for this parameter.
Remarks
When interpreting the returned relation value, it is important to remember that the member IsContained of the D2D1_GEOMETRY_RELATION enumeration type means that this geometry is contained inside inputGeometry, not that this geometry contains inputGeometry. For more information about how to interpret other possible return values, see GeometryRelation.
Compare(Geometry, RawMatrix3x2?, float)
Describes the intersection between this geometry and the specified geometry. The comparison is performed by using the specified flattening tolerance.
public GeometryRelation Compare(Geometry inputGeometry, RawMatrix3x2? inputGeometryTransform, float flatteningTolerance)
Parameters
inputGeometry
GeometryThe geometry to test.
inputGeometryTransform
RawMatrix3x2?The transform to apply to inputGeometry, or
null
.flatteningTolerance
floatThe maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution.
Returns
- GeometryRelation
When this method returns, contains a reference to a value that describes how this geometry is related to inputGeometry. You must allocate storage for this parameter.
Remarks
When interpreting the returned relation value, it is important to remember that the member D2D1_GEOMETRY_RELATION_IS_CONTAINED of the GeometryRelation enumeration type means that this geometry is contained inside inputGeometry, not that this geometry contains inputGeometry.
For more information about how to interpret other possible return values, see GeometryRelation.
Compare(Geometry, float)
Describes the intersection between this geometry and the specified geometry. The comparison is performed by using the specified flattening tolerance.
public GeometryRelation Compare(Geometry inputGeometry, float flatteningTolerance)
Parameters
inputGeometry
GeometryThe geometry to test.
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometries. Smaller values produce more accurate results but cause slower execution.
Returns
- GeometryRelation
When this method returns, contains a reference to a value that describes how this geometry is related to inputGeometry. You must allocate storage for this parameter.
Remarks
When interpreting the returned relation value, it is important to remember that the member IsContained of the D2D1_GEOMETRY_RELATION enumeration type means that this geometry is contained inside inputGeometry, not that this geometry contains inputGeometry. For more information about how to interpret other possible return values, see GeometryRelation.
ComputeArea()
Computes the area of the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.
public float ComputeArea()
Returns
- float
When this this method returns, contains a reference to the area of the transformed, flattened version of this geometry. You must allocate storage for this parameter.
ComputeArea(RawMatrix3x2?, float)
Computes the area of the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.
public float ComputeArea(RawMatrix3x2? worldTransform, float flatteningTolerance)
Parameters
worldTransform
RawMatrix3x2?The transform to apply to this geometry before computing its area.
flatteningTolerance
floatThe maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution.
Returns
- float
When this method returns, contains a reference to the area of the transformed, flattened version of this geometry. You must allocate storage for this parameter.
ComputeArea(float)
Computes the area of the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.
public float ComputeArea(float flatteningTolerance)
Parameters
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
Returns
- float
When this this method returns, contains a reference to the area of the transformed, flattened version of this geometry. You must allocate storage for this parameter.
ComputeLength()
Calculates the length of the geometry as though each segment were unrolled into a line.
public float ComputeLength()
Returns
- float
When this method returns, contains a reference to the length of the geometry. For closed geometries, the length includes an implicit closing segment. You must allocate storage for this parameter.
ComputeLength(RawMatrix3x2?, float)
Calculates the length of the geometry as though each segment were unrolled into a line.
public float ComputeLength(RawMatrix3x2? worldTransform, float flatteningTolerance)
Parameters
worldTransform
RawMatrix3x2?No documentation.
flatteningTolerance
floatNo documentation.
Returns
- float
No documentation.
ComputeLength(float)
Calculates the length of the geometry as though each segment were unrolled into a line.
public float ComputeLength(float flatteningTolerance)
Parameters
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
Returns
- float
When this method returns, contains a reference to the length of the geometry. For closed geometries, the length includes an implicit closing segment. You must allocate storage for this parameter.
ComputePointAtLength(float, out RawVector2)
Calculates the point and tangent vector at the specified distance along the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.
public RawVector2 ComputePointAtLength(float length, out RawVector2 unitTangentVector)
Parameters
length
floatThe distance along the geometry of the point and tangent to find. If this distance is less then 0, this method calculates the first point in the geometry. If this distance is greater than the length of the geometry, this method calculates the last point in the geometry.
unitTangentVector
RawVector2When this method returns, contains a reference to the tangent vector at the specified distance along the geometry. If the geometry is empty, this vector contains NaN as its x and y values. You must allocate storage for this parameter.
Returns
- RawVector2
The location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.
ComputePointAtLength(float, RawMatrix3x2?, float, out RawVector2)
Calculates the point and tangent vector at the specified distance along the geometry after it has been transformed by the specified matrix and flattened using the default tolerance.
public RawVector2 ComputePointAtLength(float length, RawMatrix3x2? worldTransform, float flatteningTolerance, out RawVector2 unitTangentVector)
Parameters
length
floatThe distance along the geometry of the point and tangent to find. If this distance is less then 0, this method calculates the first point in the geometry. If this distance is greater than the length of the geometry, this method calculates the last point in the geometry.
worldTransform
RawMatrix3x2?The transform to apply to the geometry before calculating the specified point and tangent.
flatteningTolerance
floatThe location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.
unitTangentVector
RawVector2When this method returns, contains a reference to the tangent vector at the specified distance along the geometry. If the geometry is empty, this vector contains NaN as its x and y values. You must allocate storage for this parameter.
Returns
- RawVector2
The location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.
ComputePointAtLength(float, float, out RawVector2)
Calculates the point and tangent vector at the specified distance along the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.
public RawVector2 ComputePointAtLength(float length, float flatteningTolerance, out RawVector2 unitTangentVector)
Parameters
length
floatThe distance along the geometry of the point and tangent to find. If this distance is less then 0, this method calculates the first point in the geometry. If this distance is greater than the length of the geometry, this method calculates the last point in the geometry.
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
unitTangentVector
RawVector2When this method returns, contains a reference to the tangent vector at the specified distance along the geometry. If the geometry is empty, this vector contains NaN as its x and y values. You must allocate storage for this parameter.
Returns
- RawVector2
The location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.
FillContainsPoint(RawPoint)
Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance.
public bool FillContainsPoint(RawPoint point)
Parameters
point
RawPointThe point to test.
Returns
- bool
When this method returns, contains a bool value that is true if the area filled by the geometry contains point; otherwise, false.You must allocate storage for this parameter.
FillContainsPoint(RawPoint, RawMatrix3x2, float)
Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance.
public bool FillContainsPoint(RawPoint point, RawMatrix3x2 worldTransform, float flatteningTolerance)
Parameters
point
RawPointThe point to test.
worldTransform
RawMatrix3x2The transform to apply to the geometry prior to testing for containment, or NULL.
flatteningTolerance
floatThe numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the fill by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.
Returns
- bool
When this method returns, contains a bool value that is true if the area filled by the geometry contains point; otherwise, false.You must allocate storage for this parameter.
FillContainsPoint(RawPoint, float)
Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance.
public bool FillContainsPoint(RawPoint point, float flatteningTolerance)
Parameters
point
RawPointThe point to test.
flatteningTolerance
floatThe numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the fill by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.
Returns
- bool
When this method returns, contains a bool value that is true if the area filled by the geometry contains point; otherwise, false.You must allocate storage for this parameter.
FillContainsPoint(RawVector2)
Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance.
public bool FillContainsPoint(RawVector2 point)
Parameters
point
RawVector2The point to test.
Returns
- bool
When this method returns, contains a bool value that is true if the area filled by the geometry contains point; otherwise, false.You must allocate storage for this parameter.
FillContainsPoint(RawVector2, RawMatrix3x2?, float)
Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance.
public RawBool FillContainsPoint(RawVector2 point, RawMatrix3x2? worldTransform, float flatteningTolerance)
Parameters
point
RawVector2The point to test.
worldTransform
RawMatrix3x2?The transform to apply to the geometry prior to testing for containment, or
null
.flatteningTolerance
floatThe numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the fill by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.
Returns
- RawBool
When this method returns, contains a SharpDX.Mathematics.Interop.RawBool value that is TRUE if the area filled by the geometry contains point; otherwise, SharpDX.Result.False.You must allocate storage for this parameter.
FillContainsPoint(RawVector2, float)
Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance.
public bool FillContainsPoint(RawVector2 point, float flatteningTolerance)
Parameters
point
RawVector2The point to test.
flatteningTolerance
floatThe numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the fill by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.
Returns
- bool
When this method returns, contains a bool value that is true if the area filled by the geometry contains point; otherwise, false.You must allocate storage for this parameter.
GetBounds()
Retrieves the bounds of the geometry.
public RawRectangleF GetBounds()
Returns
- RawRectangleF
When this method returns, contains the bounds of this geometry. If the bounds are empty, this will be a rect where bounds.left > bounds.right. You must allocate storage for this parameter.
GetBounds(RawMatrix3x2?)
Retrieves the bounds of the geometry.
public RawRectangleF GetBounds(RawMatrix3x2? worldTransform)
Parameters
worldTransform
RawMatrix3x2?No documentation.
Returns
- RawRectangleF
No documentation.
GetWidenedBounds(float)
Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.
public RawRectangleF GetWidenedBounds(float strokeWidth)
Parameters
strokeWidth
floatThe amount by which to widen the geometry by stroking its outline.
Returns
- RawRectangleF
When this method returns, contains the bounds of the widened geometry. You must allocate storage for this parameter.
GetWidenedBounds(float, StrokeStyle, RawMatrix3x2?, float)
Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.
public RawRectangleF GetWidenedBounds(float strokeWidth, StrokeStyle strokeStyle, RawMatrix3x2? worldTransform, float flatteningTolerance)
Parameters
strokeWidth
floatThe amount by which to widen the geometry by stroking its outline.
strokeStyle
StrokeStyleThe style of the stroke that widens the geometry.
worldTransform
RawMatrix3x2?A transform to apply to the geometry after the geometry is transformed and after the geometry has been stroked.
flatteningTolerance
floatWhen this method returns, contains the bounds of the widened geometry. You must allocate storage for this parameter.
Returns
- RawRectangleF
When this method returns, contains the bounds of the widened geometry. You must allocate storage for this parameter.
GetWidenedBounds(float, StrokeStyle, float)
Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.
public RawRectangleF GetWidenedBounds(float strokeWidth, StrokeStyle strokeStyle, float flatteningTolerance)
Parameters
strokeWidth
floatThe amount by which to widen the geometry by stroking its outline.
strokeStyle
StrokeStyleThe style of the stroke that widens the geometry.
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
Returns
- RawRectangleF
When this method returns, contains the bounds of the widened geometry. You must allocate storage for this parameter.
GetWidenedBounds(float, float)
Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.
public RawRectangleF GetWidenedBounds(float strokeWidth, float flatteningTolerance)
Parameters
strokeWidth
floatThe amount by which to widen the geometry by stroking its outline.
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
Returns
- RawRectangleF
When this method returns, contains the bounds of the widened geometry. You must allocate storage for this parameter.
Outline(GeometrySink)
Computes the outline of the geometry and writes the result to an SimplifiedGeometrySink.
public void Outline(GeometrySink geometrySink)
Parameters
geometrySink
GeometrySinkThe SimplifiedGeometrySink to which the geometry's transformed outline is appended.
Remarks
The {{Outline}} method allows the caller to produce a geometry with an equivalent fill to the input geometry, with the following additional properties: The output geometry contains no transverse intersections; that is, segments may touch, but they never cross.The outermost figures in the output geometry are all oriented counterclockwise. The output geometry is fill-mode invariant; that is, the fill of the geometry does not depend on the choice of the fill mode. For more information about the fill mode, see FillMode.Additionally, the {{Outline}} method can be useful in removing redundant portions of said geometries to simplify complex geometries. It can also be useful in combination with GeometryGroup to create unions among several geometries simultaneously.
Outline(RawMatrix3x2?, float, SimplifiedGeometrySink)
Computes the outline of the geometry and writes the result to an SimplifiedGeometrySink.
public void Outline(RawMatrix3x2? worldTransform, float flatteningTolerance, SimplifiedGeometrySink geometrySink)
Parameters
worldTransform
RawMatrix3x2?No documentation.
flatteningTolerance
floatNo documentation.
geometrySink
SimplifiedGeometrySinkNo documentation.
Outline(float, GeometrySink)
Computes the outline of the geometry and writes the result to an SimplifiedGeometrySink.
public void Outline(float flatteningTolerance, GeometrySink geometrySink)
Parameters
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
geometrySink
GeometrySinkThe SimplifiedGeometrySink to which the geometry's transformed outline is appended.
Remarks
The {{Outline}} method allows the caller to produce a geometry with an equivalent fill to the input geometry, with the following additional properties: The output geometry contains no transverse intersections; that is, segments may touch, but they never cross.The outermost figures in the output geometry are all oriented counterclockwise. The output geometry is fill-mode invariant; that is, the fill of the geometry does not depend on the choice of the fill mode. For more information about the fill mode, see FillMode.Additionally, the {{Outline}} method can be useful in removing redundant portions of said geometries to simplify complex geometries. It can also be useful in combination with GeometryGroup to create unions among several geometries simultaneously.
Simplify(GeometrySimplificationOption, SimplifiedGeometrySink)
Creates a simplified version of the geometry that contains only lines and (optionally) cubic Bezier curves and writes the result to an SimplifiedGeometrySink.
public void Simplify(GeometrySimplificationOption simplificationOption, SimplifiedGeometrySink geometrySink)
Parameters
simplificationOption
GeometrySimplificationOptionA value that specifies whether the simplified geometry should contain curves.
geometrySink
SimplifiedGeometrySinkThe SimplifiedGeometrySink to which the simplified geometry is appended.
Simplify(GeometrySimplificationOption, RawMatrix3x2?, float, SimplifiedGeometrySink)
Creates a simplified version of the geometry that contains only lines and (optionally) cubic Bezier curves and writes the result to an SimplifiedGeometrySink.
public void Simplify(GeometrySimplificationOption simplificationOption, RawMatrix3x2? worldTransform, float flatteningTolerance, SimplifiedGeometrySink geometrySink)
Parameters
simplificationOption
GeometrySimplificationOptionNo documentation.
worldTransform
RawMatrix3x2?No documentation.
flatteningTolerance
floatNo documentation.
geometrySink
SimplifiedGeometrySinkNo documentation.
Simplify(GeometrySimplificationOption, float, SimplifiedGeometrySink)
Creates a simplified version of the geometry that contains only lines and (optionally) cubic Bezier curves and writes the result to an SimplifiedGeometrySink.
public void Simplify(GeometrySimplificationOption simplificationOption, float flatteningTolerance, SimplifiedGeometrySink geometrySink)
Parameters
simplificationOption
GeometrySimplificationOptionA value that specifies whether the simplified geometry should contain curves.
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
geometrySink
SimplifiedGeometrySinkThe SimplifiedGeometrySink to which the simplified geometry is appended.
StrokeContainsPoint(RawPoint, float)
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
public bool StrokeContainsPoint(RawPoint point, float strokeWidth)
Parameters
point
RawPointThe point to test for containment.
strokeWidth
floatThe thickness of the stroke to apply.
Returns
- bool
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
StrokeContainsPoint(RawPoint, float, StrokeStyle)
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
public bool StrokeContainsPoint(RawPoint point, float strokeWidth, StrokeStyle strokeStyle)
Parameters
point
RawPointThe point to test for containment.
strokeWidth
floatThe thickness of the stroke to apply.
strokeStyle
StrokeStyleThe style of stroke to apply.
Returns
- bool
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
StrokeContainsPoint(RawPoint, float, StrokeStyle, RawMatrix3x2)
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
public bool StrokeContainsPoint(RawPoint point, float strokeWidth, StrokeStyle strokeStyle, RawMatrix3x2 transform)
Parameters
point
RawPointThe point to test for containment.
strokeWidth
floatThe thickness of the stroke to apply.
strokeStyle
StrokeStyleThe style of stroke to apply.
transform
RawMatrix3x2The transform to apply to the stroked geometry.
Returns
- bool
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
StrokeContainsPoint(RawPoint, float, StrokeStyle, RawMatrix3x2, float)
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
public bool StrokeContainsPoint(RawPoint point, float strokeWidth, StrokeStyle strokeStyle, RawMatrix3x2 transform, float flatteningTolerance)
Parameters
point
RawPointThe point to test for containment.
strokeWidth
floatThe thickness of the stroke to apply.
strokeStyle
StrokeStyleThe style of stroke to apply.
transform
RawMatrix3x2The transform to apply to the stroked geometry.
flatteningTolerance
floatThe numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the stroke by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.
Returns
- bool
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
StrokeContainsPoint(RawVector2, float)
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
public bool StrokeContainsPoint(RawVector2 point, float strokeWidth)
Parameters
point
RawVector2The point to test for containment.
strokeWidth
floatThe thickness of the stroke to apply.
Returns
- bool
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
StrokeContainsPoint(RawVector2, float, StrokeStyle)
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
public bool StrokeContainsPoint(RawVector2 point, float strokeWidth, StrokeStyle strokeStyle)
Parameters
point
RawVector2The point to test for containment.
strokeWidth
floatThe thickness of the stroke to apply.
strokeStyle
StrokeStyleThe style of stroke to apply.
Returns
- bool
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
StrokeContainsPoint(RawVector2, float, StrokeStyle, RawMatrix3x2)
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
public bool StrokeContainsPoint(RawVector2 point, float strokeWidth, StrokeStyle strokeStyle, RawMatrix3x2 transform)
Parameters
point
RawVector2The point to test for containment.
strokeWidth
floatThe thickness of the stroke to apply.
strokeStyle
StrokeStyleThe style of stroke to apply.
transform
RawMatrix3x2The transform to apply to the stroked geometry.
Returns
- bool
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
StrokeContainsPoint(RawVector2, float, StrokeStyle, RawMatrix3x2?, float)
Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform.
public RawBool StrokeContainsPoint(RawVector2 point, float strokeWidth, StrokeStyle strokeStyle, RawMatrix3x2? worldTransform, float flatteningTolerance)
Parameters
point
RawVector2The point to test for containment.
strokeWidth
floatThe thickness of the stroke to apply.
strokeStyle
StrokeStyleThe style of stroke to apply.
worldTransform
RawMatrix3x2?The transform to apply to the stroked geometry.
flatteningTolerance
floatThe numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the stroke by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.
Returns
- RawBool
When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter.
Tessellate(TessellationSink)
Creates a set of clockwise-wound triangles that cover the geometry after it has been transformed using the specified matrix and flattened using the specified tolerance
public void Tessellate(TessellationSink tessellationSink)
Parameters
tessellationSink
TessellationSinkThe TessellationSink to which the tessellated is appended.
Tessellate(RawMatrix3x2?, float, TessellationSink)
Creates a set of clockwise-wound triangles that cover the geometry after it has been transformed using the specified matrix and flattened using the default tolerance.
public void Tessellate(RawMatrix3x2? worldTransform, float flatteningTolerance, TessellationSink tessellationSink)
Parameters
worldTransform
RawMatrix3x2?The transform to apply to this geometry.
flatteningTolerance
floatThe TessellationSink to which the tessellated is appended.
tessellationSink
TessellationSinkThe TessellationSink to which the tessellated is appended.
Tessellate(float, TessellationSink)
Creates a set of clockwise-wound triangles that cover the geometry after it has been transformed using the specified matrix and flattened using the specified tolerance
public void Tessellate(float flatteningTolerance, TessellationSink tessellationSink)
Parameters
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
tessellationSink
TessellationSinkThe TessellationSink to which the tessellated is appended.
Widen(float, GeometrySink)
Widens the geometry by the specified stroke and writes the result to an SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the specified tolerance.
public void Widen(float strokeWidth, GeometrySink geometrySink)
Parameters
strokeWidth
floatThe amount by which to widen the geometry.
geometrySink
GeometrySinkThe SimplifiedGeometrySink to which the widened geometry is appended.
Widen(float, StrokeStyle, RawMatrix3x2?, float, SimplifiedGeometrySink)
Widens the geometry by the specified stroke and writes the result to an SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the specified tolerance.
public void Widen(float strokeWidth, StrokeStyle strokeStyle, RawMatrix3x2? worldTransform, float flatteningTolerance, SimplifiedGeometrySink geometrySink)
Parameters
strokeWidth
floatNo documentation.
strokeStyle
StrokeStyleNo documentation.
worldTransform
RawMatrix3x2?No documentation.
flatteningTolerance
floatNo documentation.
geometrySink
SimplifiedGeometrySinkNo documentation.
Widen(float, StrokeStyle, float, GeometrySink)
Widens the geometry by the specified stroke and writes the result to an SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the specified tolerance.
public void Widen(float strokeWidth, StrokeStyle strokeStyle, float flatteningTolerance, GeometrySink geometrySink)
Parameters
strokeWidth
floatThe amount by which to widen the geometry.
strokeStyle
StrokeStyleThe style of stroke to apply to the geometry, or NULL.
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
geometrySink
GeometrySinkThe SimplifiedGeometrySink to which the widened geometry is appended.
Widen(float, float, GeometrySink)
Widens the geometry by the specified stroke and writes the result to an SimplifiedGeometrySink after it has been transformed by the specified matrix and flattened using the specified tolerance.
public void Widen(float strokeWidth, float flatteningTolerance, GeometrySink geometrySink)
Parameters
strokeWidth
floatThe amount by which to widen the geometry.
flatteningTolerance
floatThe maximum bounds on the distance between points in the polygonal approximation of the geometry. Smaller values produce more accurate results but cause slower execution.
geometrySink
GeometrySinkThe SimplifiedGeometrySink to which the widened geometry is appended.
Operators
explicit operator Geometry(nint)
public static explicit operator Geometry(nint nativePtr)
Parameters
nativePtr
nint