Erase the existing background (including any lines) before drawing a box. This allows boxes to be placed over curves and lines.

Change the order of lines being drawn to support boxes being able to be placed on top of curves and lines.
This commit is contained in:
Rich
2013-10-24 21:47:01 +00:00
parent cc60d4ff46
commit 5271561b84
2 changed files with 11 additions and 4 deletions

View File

@@ -34,7 +34,12 @@ namespace VG
public void DrawLine(Pen pn, float startx, float starty, float endx, float endy)
{ _VGOutput.DrawLine(pn, startx, starty, endx, endy); }
public void DrawRectangle(Pen pn, RectangleF rectf)
{ _VGOutput.DrawRectangle(pn, rectf.X, rectf.Y, rectf.Width, rectf.Height); }
{
_VGOutput.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceCopy;
_VGOutput.FillRectangle(Brushes.Transparent, rectf.X, rectf.Y, rectf.Width, rectf.Height);
_VGOutput.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
_VGOutput.DrawRectangle(pn, rectf.X, rectf.Y, rectf.Width, rectf.Height);
}
public void DrawEllipse(Pen pn, float cx, float cy, float dx, float dy)
{ _VGOutput.DrawEllipse(pn, cx, cy, dx, dy); }
public void DrawImage(Bitmap bm, RectangleF rectf)