Example #1
0
 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;
     }
 }
Example #2
0
 internal void Draw(DXCanvas canvas, DXCanvas.Layer layer, IBoard board, ZoomCanvas.ZoomScroll scroll)
 {
     Children.ForEach(item => item.Draw(canvas, layer, board, scroll, Offset));
 }
Example #3
0
            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);
                }
            }
Example #4
0
 public override void Draw(DXCanvas canvas, DXCanvas.Layer layer, IBoard board, ZoomCanvas.ZoomScroll scroll, Vector offset)
 {
     canvas.Draw(Mesh);
     canvas.Draw(Lines);
 }
Example #5
0
 public abstract void Draw(DXCanvas canvas, DXCanvas.Layer layer, IBoard board, ZoomCanvas.ZoomScroll scroll, Vector offset);