Package com.storedobject.svg
Class Square
java.lang.Object
com.storedobject.svg.Svg
com.storedobject.svg.Element
com.storedobject.svg.Rectangle
com.storedobject.svg.Square
-
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 TypeMethodDescriptionat(double x, double y) Set the position.Set the position.doublegetSize()Get the size.height(double h) Set the height.static Squareof(double size) Create a square at (0, 0).static Squareof(double x, double y, double size) Create a square.static SquareCreate a square.voidsetH(double h) Set the height.voidsetSize(double size) Set the size.voidsetW(double w) Set the width.size(double size) Set the size.width(double w) Set the width.x(double x) Set the X coordinate.y(double y) Set the Y coordinate.Methods inherited from class com.storedobject.svg.Rectangle
build, getH, getPosition, getW, of, of, of, setPosition, setX, setYMethods 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
-
Square
-
Square
public Square(double x, double y, double size) Constructor.- Parameters:
x- Top-left X coordinate.y- Top-left Y coordinate.size- Size.
-
Square
public Square(double size) Constructor.- Parameters:
size- Size.
-
Square
public Square()Constructor. -
Square
-
-
Method Details
-
setSize
public void setSize(double size) Set the size.- Parameters:
size- Size.
-
getSize
public double getSize()Get the size.- Returns:
- Size.
-
setW
-
setH
-
of
-
of
Create a square.- Parameters:
x- Top-left X coordinate.y- Top-left Y coordinate.size- Size.- Returns:
- Square.
-
of
Create a square at (0, 0).- Parameters:
size- Size.- Returns:
- Square.
-
size
-
at
-
at
-
x
-
y
-
width
-
height
-