Package com.storedobject.svg
Class Ellipse
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringRetrieves a string representation of the node's attributes.center(double cx, double cy) Set the center.Set the center.protected voidcompute()This method is invoked to perform any necessary computations just before the SVG content is generated.Get the center point.doubleGet the center X coordinate.doubleGet the center Y coordinate.doubleGet the radius X.doubleGet the radius Y.static Ellipseof(double rx, double ry) Create an ellipse at (rx, ry).static Ellipseof(double cx, double cy, double rx, double ry) Create an ellipse.static EllipseCreate an ellipse.radius(double rx, double ry) Set the radius.voidsetCenter(double cx, double cy) Set the center.voidSet the center.voidsetRadius(double rx, double ry) Set the radius.Methods inherited from class com.storedobject.svg.Node
copy, createDocument, equals, escapeXml, extraContent, flipHorizontally, flipHorizontallyAroundOrigin, flipVertically, flipVerticallyAroundOrigin, getCoordinates, getId, getMargin, getSvg, hashCode, id, ID, IDValue, innerContent, moveTo, moveTo, rotate, rotateAround, rotateAround, rotateAroundCenter, scale, scale, scaleHeightTo, scaleTo, scaleWidthTo, toString, toString, transform, translate, translate
-
Constructor Details
-
Ellipse
Constructor.- Parameters:
center- Center point.rx- Radius X.ry- Radius Y.
-
Ellipse
public Ellipse(double cx, double cy, double rx, double ry) Constructor.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.rx- Radius X.ry- Radius Y.
-
Ellipse
public Ellipse(double rx, double ry) Constructor.- Parameters:
rx- Radius X.ry- Radius Y.
-
Ellipse
-
Ellipse
public Ellipse()Constructor.
-
-
Method Details
-
setCenter
-
setCenter
public void setCenter(double cx, double cy) Set the center.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.
-
getCenter
-
getCenterX
public double getCenterX()Get the center X coordinate.- Returns:
- Center X coordinate.
-
getCenterY
public double getCenterY()Get the center Y coordinate.- Returns:
- Center Y coordinate.
-
setRadius
public void setRadius(double rx, double ry) Set the radius.- Parameters:
rx- Radius X.ry- Radius Y.
-
getRadiusX
public double getRadiusX()Get the radius X.- Returns:
- Radius X.
-
getRadiusY
public double getRadiusY()Get the radius Y.- Returns:
- Radius Y.
-
of
-
of
Create an ellipse.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.rx- Radius X.ry- Radius Y.- Returns:
- Ellipse.
-
of
Create an ellipse at (rx, ry).- Parameters:
rx- Radius X.ry- Radius Y.- Returns:
- Ellipse.
-
center
-
center
Set the center.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.- Returns:
- Self.
-
radius
Set the radius.- Parameters:
rx- Radius X.ry- Radius Y.- Returns:
- Self.
-
compute
-
attributes
Description copied from class:NodeRetrieves a string representation of the node's attributes. This method is typically overridden by subclasses to provide specific attributes corresponding to the node's state or properties. By default, this method returns null if no attributes are defined.- Overrides:
attributesin classNode<Ellipse>- Returns:
- A string representing the attributes of the node, or null if no attributes are defined.
-