/// <summary>
 /// Paints the ruler scale onto the given Graphics object.
 /// </summary>
 public void PaintRuler()
 {
     // ----- Draw the ruler background -----
     using (Brush brush = new SolidBrush(settings.Theme.Background))
     {
         if (resizeMode.HasFlag(FormResizeMode.Horizontal))
         {
             g.FillRectangle(brush, 0, 0, c.Width, drawWidth);
         }
         if (resizeMode.HasFlag(FormResizeMode.Vertical))
         {
             g.FillRectangle(brush, 0, 0, drawWidth, c.Height);
         }
     }
     // ----- Draw the ruler scale -----
     if (!settings.HideRulerScale)
     {
         if (resizeMode.HasFlag(FormResizeMode.Horizontal))
         {
             PaintRulerScale(false);
         }
         if (resizeMode.HasFlag(FormResizeMode.Vertical))
         {
             PaintRulerScale(true);
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Paints the ruler scale onto the given Graphics object.
 /// </summary>
 public void PaintRuler()
 {
     ApplyTransformation();
     // ----- Draw the ruler background -----
     PaintRulerCanvas();
     // ----- Draw the ruler scale -----
     if (!settings.HideRulerScale)
     {
         if (resizeMode.HasFlag(FormResizeMode.Horizontal))
         {
             PaintRulerScale(false);
         }
         if (resizeMode.HasFlag(FormResizeMode.Vertical))
         {
             PaintRulerScale(true);
         }
     }
     g.ResetTransform();
 }