org.apache.batik.gvt.text

Class TextPath

public class TextPath extends Object

A text path describes a path along which some text will be rendered.
Constructor Summary
TextPath(GeneralPath path)
Constructs a TextPath based on the specified path.
Method Summary
floatangleAtLength(float length)
Returns the angle at the specified length along the path.
floatgetStartOffset()
Returns the start offset of this text path.
floatlengthOfPath()
Returns the total length of the path.
Point2DpointAtLength(float length)
Returns the point that is at the specified length along the path.
voidsetStartOffset(float startOffset)
Sets the offset along the path where the first glyph should be rendered.

Constructor Detail

TextPath

public TextPath(GeneralPath path)
Constructs a TextPath based on the specified path.

Parameters: path The general path along which text is to be laid.

Method Detail

angleAtLength

public float angleAtLength(float length)
Returns the angle at the specified length along the path.

Parameters: length The length along the path.

Returns: The angle.

getStartOffset

public float getStartOffset()
Returns the start offset of this text path.

Returns: The start offset of this text path.

lengthOfPath

public float lengthOfPath()
Returns the total length of the path.

Returns: The lenght of the path.

pointAtLength

public Point2D pointAtLength(float length)
Returns the point that is at the specified length along the path.

Parameters: length The length along the path.

Returns: The point.

setStartOffset

public void setStartOffset(float startOffset)
Sets the offset along the path where the first glyph should be rendered.

Parameters: startOffset An offset from the start of the path.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.