Пример #1
0
        public virtual void Draw(ICanvas canvas, RectangleF unitRectangle)
        {
            if (IsVisiblity == false)
            {
                return;
            }
            var items = this.GetBasic();

            DrawUtils.Draw(canvas, items, 0);
            if (this.IsSelected)
            {
                DrawUtils.DrawNode(canvas, this.P1);
            }
            this.ShowFigureSN(canvas);
        }
Пример #2
0
 public void Draw(ICanvas canvas, RectangleF unitRectangle)
 {
     if (this.SecondPoint == UnitPoint.Empty)
     {
         return;
     }
     if (this.IsSelected)
     {
         canvas.DrawSingleRectangle(canvas, DrawUtils.CustomSelectedPens[this.LayerId], this.LeftTopPoint, this.RightTopPoint, this.RightBottomPoint, this.LeftBottomPoint, this.IsClockWiseDirection);
         if (this.OverCuttingLength != 0)
         {
             for (int i = 0; i < this.OverCuttingPoints.Count - 1; i++)
             {
                 canvas.DrawLine(canvas, DrawUtils.SelectecedOverCuttingPen, this.OverCuttingPoints[i], this.OverCuttingPoints[i + 1]);
             }
         }
         //绘制节点
         if (canvas.DataModel.DrawingPattern == DrawingPattern.NodeEditPattern && this.drawStatus == DrawObjectMouseDown.Done)
         {
             DrawUtils.DrawNode(canvas, this.LeftTopPoint);
             DrawUtils.DrawNode(canvas, this.RightTopPoint);
             DrawUtils.DrawNode(canvas, this.RightBottomPoint);
             DrawUtils.DrawNode(canvas, this.LeftBottomPoint);
         }
     }
     else
     {
         canvas.DrawSingleRectangle(canvas, DrawUtils.CustomPens[this.LayerId], this.LeftTopPoint, this.RightTopPoint, this.RightBottomPoint, this.LeftBottomPoint, this.IsClockWiseDirection);
         if (this.OverCuttingLength != 0)
         {
             for (int i = 0; i < this.OverCuttingPoints.Count - 1; i++)
             {
                 canvas.DrawLine(canvas, DrawUtils.SelectecedOverCuttingPen, this.OverCuttingPoints[i], this.OverCuttingPoints[i + 1]);
             }
         }
     }
     this.ShowStartMovePoint(canvas);
     this.ShowFigureSN(canvas);
     //this.ShowBoundRect(canvas,penIndex);
 }