Package org.apache.batik.ext.awt.geom
Class PathLength.PathSegment
java.lang.Object
org.apache.batik.ext.awt.geom.PathLength.PathSegment
- Enclosing class:
- PathLength
A single path segment in the flattened version of the path.
This is a local helper class. PathSegment-objects are stored in
the
PathLength.segments
- list.
This is used as an immutable value-object.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
The index of the original path segment this flattened segment is a part of.protected float
The length of the path segment, accumulated from the start.protected final int
The path segment type.protected float
The x coordinate of the path segment.protected float
The y coordinate of the path segment. -
Method Summary
Modifier and TypeMethodDescriptionint
getIndex()
Returns the segment index.float
Returns the length of the path segment.int
Returns the segment type.float
getX()
Returns the x coordinate of the path segment.float
getY()
Returns the y coordinate of the path segment.void
setIndex
(int v) Sets the segment index.void
setLength
(float v) Sets the length of the path segment.void
setX
(float v) Sets the x coordinate of the path segment.void
setY
(float v) Sets the y coordinate of the path segment.
-
Field Details
-
segType
protected final int segTypeThe path segment type. -
x
protected float xThe x coordinate of the path segment. -
y
protected float yThe y coordinate of the path segment. -
length
protected float lengthThe length of the path segment, accumulated from the start. -
index
protected int indexThe index of the original path segment this flattened segment is a part of.
-
-
Method Details
-
getSegType
public int getSegType()Returns the segment type. -
getX
public float getX()Returns the x coordinate of the path segment. -
setX
public void setX(float v) Sets the x coordinate of the path segment. -
getY
public float getY()Returns the y coordinate of the path segment. -
setY
public void setY(float v) Sets the y coordinate of the path segment. -
getLength
public float getLength()Returns the length of the path segment. -
setLength
public void setLength(float v) Sets the length of the path segment. -
getIndex
public int getIndex()Returns the segment index. -
setIndex
public void setIndex(int v) Sets the segment index.
-