TransformBrush()

View as Markdown

Definition

Scales a non-solid color brush used for rendering the chart style to properly display in NinjaTrader.

This method has no impact on solid color brushes. You would only need to pass in either a linear or radial gradient brush.

Method Return Value

This method does not return a value.

Syntax

TransformBrush(SharpDX.Direct2D1.Brush brush, RectangleF rect)

Method Parameters

ParameterDescription
brushA SharpDX.Direct2D1.Brush object representing the brush used to render
rectA RectangleF structure representing the rectangle to be rendered

Examples

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars)
2{
3 TransformBrush(brush, rect);
4}