I have an indicator that draws a heatmap in OnRender. At the moment I am creating a single SharpDX Brush at the beginning of OnRender using a base color, then reassigning it as necessary in a later "for" loop, and disposing of it at the end of OnRender:
SharpDX.Direct2D1.Brush baseBrushDX = baseColor.ToDxBrush(RenderTarget);
for // loop
{
SharpDX.Direct2D1.SolidColorBrush baseBrushDX = new SharpDX.Direct2D1.SolidColorBrush(RenderTarget,GetColor(ratio, opacity));
//do the drawing
}
baseBrushDX.Dispose();
Thanks

Comment