<< Click to Display Table of Contents >>

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


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.




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

(See also unmanaged API documentation)



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.




class StrokeStyle


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


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


Retrieves the number of entries in the dashes array.


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


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


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


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


Copies the dash pattern to the specified array.


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


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


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


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