public void Dispose() { if (Line != null) { Line.Dispose(); } if (Outline != null) { Outline.Dispose(); } if (Fill != null) { Fill.Dispose(); } if (Symbol != null) { Symbol.Dispose(); } //NS, 2013-09-17 if (DashLine != null) { DashLine.Dispose(); } //NS, 2013-09-23 //if (_pointBrush != null) //{ // _pointBrush.Dispose(); // _pointBrush = null; //} //NS, 2013-10-02 if (CircleLine != null) { CircleLine.Dispose(); } }
public RealizationRelationship(Color lineColor, float lineWidth) { FilledArrowCap filledArrowCap = new FilledArrowCap(); DashLine dashLine = new DashLine(); cap = filledArrowCap; lineStyle = dashLine.lineStyle; ObjectPenColor = lineColor; ObjectPenWidth = lineWidth; }
public static List <AbstractLine> GetDashLines(PointF s, PointF e) { var list = new List <AbstractLine>(); var len = (int)Math.Abs(e.X - s.X); if (len == 0) { len = (int)Math.Abs(e.Y - s.Y); } for (int j = 0; j < len; j = j + 8) { if (s.X == e.X) { list.Add(new DashLine() { startPoint = new PointF(s.X, s.Y + j), endPoint = new PointF(s.X, s.Y + j + 4) }); } else if (s.Y == e.Y) { list.Add(new DashLine() { startPoint = new PointF(s.X + j, s.Y), endPoint = new PointF(s.X + j + 4, s.Y) }); } } var l = new DashLine() { startPoint = Point.Empty, endPoint = e, }; if (list.Count > 1) { l.startPoint = list.Last().endPoint; } else { l.startPoint = s; } list.Add(l); return(list); }