it says not to use ToDxBrush too much
but I have 5 plots on the chart, and I need that plot's color to be used in my OnRender drawings
Currently I have
SharpDX.Direct2D1.Brush USDBrush = Plots[0].Pen.Brush.ToDxBrush(RenderTarget);
SharpDX.Direct2D1.Brush EURBrush = Plots[1].Pen.Brush.ToDxBrush(RenderTarget);
SharpDX.Direct2D1.Brush GBPBrush = Plots[2].Pen.Brush.ToDxBrush(RenderTarget);
SharpDX.Direct2D1.Brush JPYBrush = Plots[3].Pen.Brush.ToDxBrush(RenderTarget);
SharpDX.Direct2D1.Brush AUDBrush = Plots[4].Pen.Brush.ToDxBrush(RenderTarget);
// I draw multiple things using the same brush, but with different opacity so I need to modify this value during a for loop
USDBrush.Opacity = i > scale ? 0 : (float)i/(float)scale;
...etc
// at the end of OnRender
USDBrush.Dispose();
...etc
is there a more efficient way to do this then?
I don't want hard coded colors, if the user changes a color of a plot, I want the rendered drawings color to change as well

didn't see that
Comment