public static Rect2 ToRect2(this EllipseShape ellipse, double dx = 0.0, double dy = 0.0) { return(Rect2.FromPoints( ellipse.TopLeft.X, ellipse.TopLeft.Y, ellipse.BottomRight.X, ellipse.BottomRight.Y, dx, dy)); }
public override object Copy(IDictionary <object, object> shared) { var copy = new EllipseShape() { Style = this.Style, Transform = (MatrixObject)this.Transform?.Copy(shared) }; if (shared != null) { copy.TopLeft = (PointShape)shared[this.TopLeft]; copy.BottomRight = (PointShape)shared[this.BottomRight]; foreach (var point in this.Points) { copy.Points.Add((PointShape)shared[point]); } } return(copy); }