Class StrokeStyle
[Guid("2cd9069d-12e2-11dc-9fed-001143a055f9")]
public class StrokeStyle : Resource
- Inheritance
-
StrokeStyle
- Derived
- Inherited Members
Constructors
StrokeStyle(Factory, StrokeStyleProperties)
Creates an StrokeStyle that describes start cap, dash pattern, and other features of a stroke.
public StrokeStyle(Factory factory, StrokeStyleProperties properties)
Parameters
factory
Factoryan instance of Factory
properties
StrokeStylePropertiesa definition for this render target
StrokeStyle(Factory, StrokeStyleProperties, float[])
Creates an StrokeStyle that describes start cap, dash pattern, and other features of a stroke.
public StrokeStyle(Factory factory, StrokeStyleProperties properties, float[] dashes)
Parameters
factory
Factoryan instance of Factory
properties
StrokeStylePropertiesA structure that describes the stroke's line cap, dash offset, and other details of a stroke.
dashes
float[]An array whose elements are set to the length of each dash and space in the dash pattern. The first element sets the length of a dash, the second element sets the length of a space, the third element sets the length of a dash, and so on. The length of each dash and space in the dash pattern is the product of the element value in the array and the stroke width.
StrokeStyle(nint)
public StrokeStyle(nint nativePtr)
Parameters
nativePtr
nint
Properties
DashCap
Gets a value that specifies how the ends of each dash are drawn.
public CapStyle DashCap { get; }
Property Value
DashOffset
Retrieves a value that specifies how far in the dash sequence the stroke will start.
public float DashOffset { get; }
Property Value
DashStyle
Gets a value that describes the stroke's dash pattern.
public DashStyle DashStyle { get; }
Property Value
Remarks
If a custom dash style is specified, the dash pattern is described by the dashes array, which can be retrieved by calling the GetDashes method.
DashesCount
Retrieves the number of entries in the dashes array.
public int DashesCount { get; }
Property Value
EndCap
Retrieves the type of shape used at the end of a stroke.
public CapStyle EndCap { get; }
Property Value
LineJoin
Retrieves the type of joint used at the vertices of a shape's outline.
public LineJoin LineJoin { get; }
Property Value
MiterLimit
Retrieves the limit on the ratio of the miter length to half the stroke's thickness.
public float MiterLimit { get; }
Property Value
StartCap
Retrieves the type of shape used at the beginning of a stroke.
public CapStyle StartCap { get; }
Property Value
Methods
GetDashes(float[], int)
Copies the dash pattern to the specified array.
public void GetDashes(float[] dashes, int dashesCount)
Parameters
dashes
float[]A reference to an array that will receive the dash pattern. The array must be able to contain at least as many elements as specified by dashesCount. You must allocate storage for this array.
dashesCount
intThe number of dashes to copy. If this value is less than the number of dashes in the stroke style's dashes array, the returned dashes are truncated to dashesCount. If this value is greater than the number of dashes in the stroke style's dashes array, the extra dashes are set to 0.0f. To obtain the actual number of dashes in the stroke style's dashes array, use the GetDashesCount method.
Remarks
The dashes are specified in units that are a multiple of the stroke width, with subsequent members of the array indicating the dashes and gaps between dashes: the first entry indicates a filled dash, the second a gap, and so on.
Operators
explicit operator StrokeStyle(nint)
public static explicit operator StrokeStyle(nint nativePtr)
Parameters
nativePtr
nint