Package com.storedobject.svg
Class Rectangle
java.lang.Object
com.storedobject.svg.Svg
com.storedobject.svg.Element
com.storedobject.svg.Rectangle
-
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.voidbuild()Build the SVG.doublegetH()Get the height.Get the position.doublegetW()Get the width.height(double h) Set the height.static Rectangleof(double w, double h) Create a rectangle at (0, 0).static Rectangleof(double x, double y, double w, double h) Create a rectangle.static RectangleCreate a rectangle.voidsetH(double h) Set the height.voidsetPosition(Point p) Set the position.voidsetW(double w) Set the width.voidsetX(double x) Set the X coordinate.voidsetY(double y) Set the Y coordinate.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.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
-
Rectangle
Constructor.- Parameters:
p- Top-left point.w- Width.h- Height.
-
Rectangle
public Rectangle(double x, double y, double w, double h) Constructor.- Parameters:
x- Top-left X coordinate.y- Top-left Y coordinate.w- Width.h- Height.
-
Rectangle
public Rectangle(double w, double h) Constructor.- Parameters:
w- Width.h- Height.
-
Rectangle
-
Rectangle
public Rectangle()Constructor.
-
-
Method Details
-
getPosition
-
setPosition
-
setX
public void setX(double x) Set the X coordinate.- Parameters:
x- X coordinate.
-
setY
public void setY(double y) Set the Y coordinate.- Parameters:
y- Y coordinate.
-
setW
public void setW(double w) Set the width.- Parameters:
w- Width.
-
getW
public double getW()Get the width.- Returns:
- Width.
-
setH
public void setH(double h) Set the height.- Parameters:
h- Height.
-
getH
public double getH()Get the height.- Returns:
- Height.
-
of
-
of
Create a rectangle.- Parameters:
x- Top-left X coordinate.y- Top-left Y coordinate.w- Width.h- Height.- Returns:
- Rectangle.
-
of
Create a rectangle at (0, 0).- Parameters:
w- Width.h- Height.- Returns:
- Rectangle.
-
at
-
at
Set the position.- Parameters:
x- X coordinate.y- Y coordinate.- Returns:
- Self.
-
x
-
y
-
width
-
height
-
build
-