public void RedrawIndicator(ITickerIndicator ind) { using (var g = CreateGraphics()) using (var cr = new Region(ind.Bounds)) { g.Clip = cr; DrawBackground(g); DrawIndicator(g, ind); } }
private static void DrawIndicator(Graphics g, ITickerIndicator ind) { using (var rg = new Region(ind.Bounds)) { g.Clip = rg; g.TranslateTransform(ind.Location.X, ind.Location.Y, MatrixOrder.Append); ind.Draw(g); } }