org.apache.batik.ext.awt.geom

Class PathLength.PathSegment

protected static class PathLength.PathSegment extends Object

A single path segment in the flattened version of the path. This is a local helper class. PathSegment-objects are stored in the segments - list. This is used as an immutable value-object.
Field Summary
protected intindex
The index of the original path segment this flattened segment is a part of.
protected floatlength
The length of the path segment, accumulated from the start.
protected intsegType
The path segment type.
protected floatx
The x coordinate of the path segment.
protected floaty
The y coordinate of the path segment.
Method Summary
intgetIndex()
Returns the segment index.
floatgetLength()
Returns the length of the path segment.
intgetSegType()
Returns the segment type.
floatgetX()
Returns the x coordinate of the path segment.
floatgetY()
Returns the y coordinate of the path segment.
voidsetIndex(int v)
Sets the segment index.
voidsetLength(float v)
Sets the length of the path segment.
voidsetX(float v)
Sets the x coordinate of the path segment.
voidsetY(float v)
Sets the y coordinate of the path segment.

Field Detail

index

protected int index
The index of the original path segment this flattened segment is a part of.

length

protected float length
The length of the path segment, accumulated from the start.

segType

protected final int segType
The path segment type.

x

protected float x
The x coordinate of the path segment.

y

protected float y
The y coordinate of the path segment.

Method Detail

getIndex

public int getIndex()
Returns the segment index.

getLength

public float getLength()
Returns the length of the path segment.

getSegType

public int getSegType()
Returns the segment type.

getX

public float getX()
Returns the x coordinate of the path segment.

getY

public float getY()
Returns the y coordinate of the path segment.

setIndex

public void setIndex(int v)
Sets the segment index.

setLength

public void setLength(float v)
Sets the length of the path segment.

setX

public void setX(float v)
Sets the x coordinate of the path segment.

setY

public void setY(float v)
Sets the y coordinate of the path segment.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.