SharpDX.Direct2D1.StrokeStyle

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > SharpDX SDK Reference > SharpDX.Direct2D1 >

SharpDX.Direct2D1.StrokeStyle

Previous page Return to chapter overview Next page

Disclaimer: The SharpDX SDK Reference section was compiled from the official SharpDX Documentation and was NOT authored by NinjaTrader.  The contents of this section are provided as-is and only cover a fraction of what is available from the SharpDX SDK.  This page was intended only as a reference guide to help you get started with some of the 2D Graphics concepts used in the NinjaTrader.Custom assembly.  Please refer to the official SharpDX Documentation for additional members not covered in this reference.  For more seasoned graphic developers, the original MSDN Direct2D1 and DirectWrite unmanaged API documentation can also be helpful for understanding the DirectX/Direct2D run-time environment. For NinjaScript development purposes, we document only essential members in the structure of this page.

 

 

Definition

Describes the caps, miter limit, line join, and dash information for a stroke.

(See also unmanaged API documentation)

 

Notes:  

1.A stroke style is a device-independent resource; you can create it once then retain it for the life of your application. Please see the MSDN Direct2D Resources Overview for more information.

2.For convenience, Direct2D provides the StrokeStyleProperties function for creating new a StrokeStyle.

 

 

Syntax

class StrokeStyle

 
Constructors                

new StrokeStyle(Factory factory, StrokeStyleProperties properties)

Creates an StrokeStyle that describes start cap, dash pattern, and other features of a stroke.

new StrokeStyle(Factory factory, StrokeStyleProperties properties, float[] dashes)

Creates an StrokeStyle that describes start cap, dash pattern, and other features of a stroke.

 

 

Tip: For NinjaScript development purposes, when creating a StrokeStyle object you should use the NinjaTrader.Core.Globals.D2DFactory property

 

 

Method and Properties

DashCap

Gets a value that specifies how the ends of each dash are drawn.

DashesCount

Retrieves the number of entries in the dashes array.

DashOffset

Retrieves a value that specifies how far in the dash sequence the stroke will start.

DashStyle

Gets a value that describes the stroke's dash pattern.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from SharpDX.DisposeBase.)

EndCap

Retrieves the type of shape used at the end of a stroke.

GetDashes()

Copies the dash pattern to the specified array.

IsDisposed

Gets a value indicating whether this instance is disposed. (Inherited from DisposeBase.)

LineJoin

Retrieves the type of joint used at the vertices of a shape's outline.

MiterLimit

Retrieves the limit on the ratio of the miter length to half the stroke's thickness.

StartCap

Retrieves the type of shape used at the beginning of a stroke.