Package com.storedobject.svg
Class Line
java.lang.Object
com.storedobject.svg.Node
com.storedobject.svg.Element
com.storedobject.svg.Line
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringRetrieves a string representation of the node's attributes.from(double x1, double y1) Set the start point.Set the start point.getFrom()Get the start point.getTo()Get the end point.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.Node
compute, 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
-
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
-
setY1
public void setY1(double y1) Set the start Y coordinate.- Parameters:
y1- Start Y coordinate.
-
setX2
public void setX2(double x2) Set the end X coordinate.- Parameters:
x2- End X coordinate.
-
setY2
public void setY2(double y2) Set the end Y coordinate.- Parameters:
y2- 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
-
attributes
Description copied from class:NodeRetrieves a string representation of the node's attributes. This method is typically overridden by subclasses to provide specific attributes corresponding to the node's state or properties. By default, this method returns null if no attributes are defined.- Overrides:
attributesin classNode- Returns:
- A string representing the attributes of the node, or null if no attributes are defined.
-