Class WmfEllipse
Class WmfEllipse
Namespace: Aspose.Imaging.FileFormats.Wmf.Objects
Assembly: Aspose.Imaging.dll (25.7.0)
The META_ELLIPSE record draws an ellipse. The center of the ellipse isthe center of the specified bounding rectangle. The ellipse is outlinedby using the pen and is filled by using the brush; these are defined inthe playback device context.
public class WmfEllipse : WmfRectangle
{
private int _cx;
private int _cy;
private int _width;
private int _height;
public WmfEllipse(int cx, int cy, int width, int height)
{
_cx = cx;
_cy = cy;
_width = width;
_height = height;
}
protected override void DrawCore(Graphics graphics, RectangleF bounds)
{
float x = _cx - (_width / 2);
float y = _cy - (_height / 2);
float radiusX = _width / 2;
float radiusY = _height / 2;
graphics.DrawEllipse(Pen, x, y, radiusX, radiusY);
}
}
Inheritance
object ← MetaObject ← WmfObject ← WmfRectangle ← WmfEllipse
Inherited Members
WmfRectangle.Rectangle , object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
WmfEllipse()
public WmfEllipse()
{
}