Package com.storedobject.svg
Class AbstractPolyline<P extends AbstractPolyline<P>>
java.lang.Object
com.storedobject.svg.Node<P>
com.storedobject.svg.Element<P>
com.storedobject.svg.AbstractPolyline<P>
- Type Parameters:
P- The type of the subclass extending AbstractPolyline.
- All Implemented Interfaces:
Serializable
Represents an SVG polyline.
- Author:
- Syam
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPolyline(String tag, double... coordinates) Constructs a new instance of the Polyline class with the specified SVG tag and coordinates. -
Method Summary
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
-
Field Details
-
points
-
-
Constructor Details
-
AbstractPolyline
Constructs a new instance of the Polyline class with the specified SVG tag and coordinates. This constructor initializes a polyline element with a specific tag and adds the provided points based on the coordinates supplied. If the tag is null, a default value is used.- Parameters:
tag- The SVG tag associated with this polyline. If null, a default value "polyline" will be used.coordinates- An array of coordinates (x1, y1, x2, y2, ...) representing the points of the polyline. Each pair of values corresponds to the x and y coordinates of a point.
-
-
Method Details
-
point
Add a point.- Parameters:
x- X coordinate.y- Y coordinate.- Returns:
- Self.
-
point
-
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<P extends AbstractPolyline<P>>- Returns:
- A string representing the attributes of the node, or null if no attributes are defined.
-