Package com.storedobject.svg
Class Circle
-
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.static Circleof(double r) Create a circle.static Circleof(double cx, double cy, double r) Create a circle.static CircleCreate a circle.radius(double r) Set the radius.voidsetCenter(double cx, double cy) Set the center.voidSet the center.voidsetRadius(double r) 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
-
Circle
-
Circle
public Circle(double cx, double cy, double r) Constructor.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.r- Radius.
-
Circle
public Circle(double r) Constructor.- Parameters:
r- Radius.
-
Circle
public Circle()Constructor. -
Circle
-
Circle
public Circle(double cx, double cy) Constructor.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.
-
-
Method Details
-
setRadius
public void setRadius(double r) Set the radius.- Parameters:
r- Radius.
-
getRadius
public double getRadius()Get the radius.- Returns:
- Radius.
-
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.
-
of
-
of
Create a circle.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.r- Radius.- Returns:
- Circle.
-
of
-
center
-
center
Set the center.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.- Returns:
- Self.
-
radius
-
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<Circle>- Returns:
- A string representing the attributes of the node, or null if no attributes are defined.
-