Exemple #1
0
 //在画板上画出这块区域
 public void drawRegion(Graphics dc)
 {
     //使用XorGdi类的静态方法画出区域矩形
     XorGdi.DrawRectangle(dc, PenStyles.PS_DASHDOTDOT, 2, Color.LightSeaGreen, regionRect.Left, regionRect.Top, regionRect.Right, regionRect.Bottom);
     foreach (Line l in linesInRegion)
     {
         dc.DrawLine(new Pen(Color.Black), l.P1, l.P2);
     }
 }
Exemple #2
0
 public void SetMousePoint(Graphics dc, PointF mousepoint)
 {
     if (m_point2 != PointF.Empty)
     {
         XorGdi.DrawRectangle(dc, PenStyles.PS_DOT, 1, GetColor(), m_point1, m_point2);
     }
     m_point2 = mousepoint;
     XorGdi.DrawRectangle(dc, PenStyles.PS_DOT, 1, GetColor(), m_point1, m_point2);
 }