Package com.storedobject.svg
Class Circle
java.lang.Object
com.storedobject.svg.Svg
com.storedobject.svg.Element
com.storedobject.svg.Circle
-
Nested Class Summary
Nested classes/interfaces inherited from class com.storedobject.svg.Svg
Svg.Anchor, Svg.Margin, Svg.Mover, Svg.Scale, Svg.ScaleTo -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()Build the SVG.center(double cx, double cy) Set the center.Set the center.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.Element
addStyle, isBuilt, removeStyle, stylesMethods inherited from class com.storedobject.svg.Svg
add, add, add, escapeXml, flipHorizontally, flipVertically, getFilledSvg, getHeight, getScaledSvg, getSvg, getWidth, getX, getY, margin, margin, scale, scale, scaleTo, scaleToHeight, scaleToWidth, toString
-
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
-
build
-