public ArrowShape(Rectangle rect) : base(rect) { ArrayList points = Common.GetPointsFromRect(rect); FromColor = new LeColor(Color.Red); ToColor = new LeColor(Color.Blue); path = new GraphicsPath(); path.AddPolygon((Point[])points.ToArray(typeof(Point))); this.arrowPoints = points; boundaryShape = new BoundaryShape(rect); }
public void CreatePath() { if (tempPointList.Count > 0) { path = new GraphicsPath(); path.AddPolygon((Point[])tempPointList.ToArray(typeof(Point))); RectangleF rect = path.GetBounds(); Boundary = new Rectangle((int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height); boundaryShape = new BoundaryShape(Boundary); boundaryShape.ShapeMoved += new BoundaryShape.ShapeMoveHandler(boundaryShape_ShapeMoved); boundaryShape.ShapeResized += new BoundaryShape.ResizingShapeMoveHandler(boundaryShape_ShapeResized); boundaryShape.ShapePrepareResize += delegate(MouseEventArgs e) { shapeResizing = true; }; arrowPoints = tempPointList; } }
private ArrowShape() { boundaryShape = new BoundaryShape(); boundaryShape.Boundary = base.Boundary; }