private void Surface_OnDraw(DXCanvas canvas, DXCanvas.Layer layer, ZoomCanvas.ZoomScroll scroll) { switch (layer) { case DXCanvas.Layer.Normal: foreach (Track track in Tracks) { track.Draw(canvas, layer, Board, scroll); } break; } }
internal void Draw(DXCanvas canvas, DXCanvas.Layer layer, IBoard board, ZoomCanvas.ZoomScroll scroll) { Children.ForEach(item => item.Draw(canvas, layer, board, scroll, Offset)); }
public override void Draw(DXCanvas canvas, DXCanvas.Layer layer, IBoard board, ZoomCanvas.ZoomScroll scroll, Vector offset) { canvas.Draw(Mesh); canvas.Draw(Lines); Segment unitBox = NormalizeTime(DataContext, board); double unitThreashold = scroll.ToUnitLength(TextDrawLimit); foreach (TextEntry block in TextBlocks) { double blockWidth = scroll.ToPixelLength(unitBox.Length * block.Width); if (blockWidth < TextDrawLimit) { break; } Point pixelPos = new Point(scroll.ToPixel(unitBox.Start + unitBox.Length * block.Position.X) + TextOffset, offset.Y + block.Position.Y * MaxHeight); canvas.Text.Draw(pixelPos, block.Text, Colors.Black, TextAlignment.Left, blockWidth); } }
public override void Draw(DXCanvas canvas, DXCanvas.Layer layer, IBoard board, ZoomCanvas.ZoomScroll scroll, Vector offset) { canvas.Draw(Mesh); canvas.Draw(Lines); }
public abstract void Draw(DXCanvas canvas, DXCanvas.Layer layer, IBoard board, ZoomCanvas.ZoomScroll scroll, Vector offset);