Package com.storedobject.svg
Class Line
java.lang.Object
com.storedobject.svg.Svg
com.storedobject.svg.Element
com.storedobject.svg.Line
-
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.from(double x1, double y1) Set the start point.Set the start point.getFrom()Get the start point.getTo()Get the end point.doublegetX1()Get the start X coordinate.doublegetX2()Get the end X coordinate.doublegetY1()Get the start Y coordinate.doublegetY2()Get the end Y coordinate.static Lineof(double x1, double y1, double x2, double y2) Create a line.static LineCreate a line.voidsetX1(double x1) Set the start X coordinate.voidsetX2(double x2) Set the end X coordinate.voidsetY1(double y1) Set the start Y coordinate.voidsetY2(double y2) Set the end Y coordinate.to(double x2, double y2) Set the end point.Set the end point.x1(double x1) Set the start X coordinate.x2(double x2) Set the end X coordinate.y1(double y1) Set the start Y coordinate.y2(double y2) Set the end 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
-
Line
-
Line
public Line(double x1, double y1, double x2, double y2) Constructor.- Parameters:
x1- Start X coordinate.y1- Start Y coordinate.x2- End X coordinate.y2- End Y coordinate.
-
Line
public Line()Constructor.
-
-
Method Details
-
setX1
public void setX1(double x1) Set the start X coordinate.- Parameters:
x1- Start X coordinate.
-
getFrom
-
getTo
-
getX1
public double getX1()Get the start X coordinate.- Returns:
- Start X coordinate.
-
setY1
public void setY1(double y1) Set the start Y coordinate.- Parameters:
y1- Start Y coordinate.
-
getY1
public double getY1()Get the start Y coordinate.- Returns:
- Start Y coordinate.
-
setX2
public void setX2(double x2) Set the end X coordinate.- Parameters:
x2- End X coordinate.
-
getX2
public double getX2()Get the end X coordinate.- Returns:
- End X coordinate.
-
setY2
public void setY2(double y2) Set the end Y coordinate.- Parameters:
y2- End Y coordinate.
-
getY2
public double getY2()Get the end Y coordinate.- Returns:
- End Y coordinate.
-
of
Create a line.- Parameters:
x1- Start X coordinate.y1- Start Y coordinate.x2- End X coordinate.y2- End Y coordinate.- Returns:
- Line.
-
of
-
x1
Set the start X coordinate.- Parameters:
x1- Start X coordinate.- Returns:
- Self.
-
y1
Set the start Y coordinate.- Parameters:
y1- Start Y coordinate.- Returns:
- Self.
-
x2
Set the end X coordinate.- Parameters:
x2- End X coordinate.- Returns:
- Self.
-
y2
Set the end Y coordinate.- Parameters:
y2- End Y coordinate.- Returns:
- Self.
-
from
Set the start point.- Parameters:
x1- Start X coordinate.y1- Start Y coordinate.- Returns:
- Self.
-
to
Set the end point.- Parameters:
x2- End X coordinate.y2- End Y coordinate.- Returns:
- Self.
-
from
-
to
-
build
-