SharpDX.Direct2D1.StrokeStyle

View as Markdown

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)

  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

ConstructorDescription
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

PropertyDescription
DashCapGets a value that specifies how the ends of each dash are drawn.
DashesCountRetrieves the number of entries in the dashes array.
DashOffsetRetrieves a value that specifies how far in the dash sequence the stroke will start.
DashStyleGets 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.)
EndCapRetrieves the type of shape used at the end of a stroke.
GetDashes()Copies the dash pattern to the specified array.
IsDisposedGets a value indicating whether this instance is disposed. (Inherited from DisposeBase.)
LineJoinRetrieves the type of joint used at the vertices of a shape’s outline.
MiterLimitRetrieves the limit on the ratio of the miter length to half the stroke’s thickness.
StartCapRetrieves the type of shape used at the beginning of a stroke.