Package com.storedobject.svg
Class Star
-
Field Summary
Fields inherited from class com.storedobject.svg.AbstractPolyline
points -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncenter(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 inner radius.doubleGet the outer radius.intGet the number of points.innerRadius(double innerRadius) Set the inner radius.static Starof(double cx, double cy, double innerRadius, double outerRadius, int points) Create a star.static StarCreate a star.outerRadius(double outerRadius) Set the outer radius.points(int points) Set the number of points.voidsetCenter(double cx, double cy) Set the center point.voidSet the center point.voidsetInnerRadius(double innerRadius) Set the inner radius.voidsetOuterRadius(double outerRadius) Set the outer radius.voidsetPoints(int points) Set the number of points.Methods inherited from class com.storedobject.svg.AbstractPolyline
attributes, point, pointMethods 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
-
Star
public Star(double innerRadius, double outerRadius, int points) Constructor.- Parameters:
innerRadius- Inner radius.outerRadius- Outer radius.points- Number of points.
-
Star
Constructor.- Parameters:
center- Center point.innerRadius- Inner radius.outerRadius- Outer radius.points- Number of points.
-
Star
public Star(double cx, double cy, double innerRadius, double outerRadius, int points) Constructor.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.innerRadius- Inner radius.outerRadius- Outer radius.points- Number of points.
-
Star
public Star()Constructor.
-
-
Method Details
-
setCenter
-
setCenter
public void setCenter(double cx, double cy) Set the center point.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.
-
getCenter
-
setInnerRadius
public void setInnerRadius(double innerRadius) Set the inner radius.- Parameters:
innerRadius- Inner radius.
-
getInnerRadius
public double getInnerRadius()Get the inner radius.- Returns:
- Inner radius.
-
setOuterRadius
public void setOuterRadius(double outerRadius) Set the outer radius.- Parameters:
outerRadius- Outer radius.
-
getOuterRadius
public double getOuterRadius()Get the outer radius.- Returns:
- Outer radius.
-
setPoints
public void setPoints(int points) Set the number of points.- Parameters:
points- Number of points.
-
getPoints
public int getPoints()Get the number of points.- Returns:
- Number of points.
-
of
-
of
Create a star.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.innerRadius- Inner radius.outerRadius- Outer radius.points- Number of points.- Returns:
- Star.
-
center
-
center
Set the center.- Parameters:
cx- Center X coordinate.cy- Center Y coordinate.- Returns:
- Self.
-
innerRadius
Set the inner radius.- Parameters:
innerRadius- Inner radius.- Returns:
- Self.
-
outerRadius
Set the outer radius.- Parameters:
outerRadius- Outer radius.- Returns:
- Self.
-
points
Set the number of points.- Parameters:
points- Number of points.- Returns:
- Self.
-
compute
-