예제 #1
0
 protected override void OnPaint(PaintEventArgs e)
 {
     e.Graphics.Clear(Settings.Theme.Background);
     painter.Update(e.Graphics, Settings);
     painter.PaintRuler();
     painter.PaintMarkers(mouseLine, CustomLines);
     base.OnPaint(e);
 }
예제 #2
0
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(Settings.Theme.Background);
            var painter = new RulerPainter(this, Settings);

            painter.Paint(e.Graphics);
            painter.PaintMarkers(e.Graphics, mouseLine, CustomLines);
            base.OnPaint(e);
        }
예제 #3
0
        protected override void OnPaint(PaintEventArgs e)
        {
            BufferedGraphics buffer;

            buffer = BufferedGraphicsManager.Current.Allocate(e.Graphics, e.ClipRectangle);
            // clear the graphics first
            buffer.Graphics.FillRectangle(new SolidBrush(TransparencyKey), e.ClipRectangle);
            // paint the ruler into buffer
            painter.Update(buffer.Graphics, Settings, ResizeMode);
            painter.PaintRuler();
            painter.PaintMarkers(CustomMarkers, mouseTracker.Position);
            // paint buffer onto screen
            buffer.Render();
            buffer.Dispose();
        }