|
|||||||||
| Home >> All >> org >> apache >> batik >> ext >> awt >> [ font overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.batik.ext.awt.font
Class TextPathLayout

java.lang.Objectorg.apache.batik.ext.awt.font.TextPathLayout
- public class TextPathLayout
- extends java.lang.Object
PathLayout can layout text along a Shape, usually a Path object.
There are a number of improvements that could be made to this class. I'll try to list some of them:
- The layout should really only modify the GlyphVector, rather than converting to a Shape.
- Maybe the functions should take a AttributedCharacterIterator or something? Should this class do the entire layout?
- The layout code works, but it's definitely not perfect.
- Version:
- $Id: TextPathLayout.java,v 1.4 2004/10/30 18:38:04 deweese Exp $
| Field Summary | |
static int |
ADJUST_GLYPHS
Use the entire glyph to adjust for textLength. |
static int |
ADJUST_SPACING
Use the spacing between the glyphs to adjust for textLength. |
static int |
ALIGN_END
Align the text at the end of the path. |
static int |
ALIGN_MIDDLE
Align the text at the middle of the path. |
static int |
ALIGN_START
Align the text at the start of the path. |
| Constructor Summary | |
TextPathLayout()
|
|
| Method Summary | |
static java.awt.Shape |
layoutGlyphVector(java.awt.font.GlyphVector glyphs,
java.awt.Shape path)
Wraps the GlyphVector around the given path. |
static java.awt.Shape |
layoutGlyphVector(java.awt.font.GlyphVector glyphs,
java.awt.Shape path,
int align)
Wraps the GlyphVector around the given path. |
static java.awt.Shape |
layoutGlyphVector(java.awt.font.GlyphVector glyphs,
java.awt.Shape path,
int align,
float startOffset,
float textLength,
int lengthAdjustMode)
Wraps the GlyphVector around the given path. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
ALIGN_START
public static final int ALIGN_START
- Align the text at the start of the path.
- See Also:
- Constant Field Values
ALIGN_MIDDLE
public static final int ALIGN_MIDDLE
- Align the text at the middle of the path.
- See Also:
- Constant Field Values
ALIGN_END
public static final int ALIGN_END
- Align the text at the end of the path.
- See Also:
- Constant Field Values
ADJUST_SPACING
public static final int ADJUST_SPACING
- Use the spacing between the glyphs to adjust for textLength.
- See Also:
- Constant Field Values
ADJUST_GLYPHS
public static final int ADJUST_GLYPHS
- Use the entire glyph to adjust for textLength.
- See Also:
- Constant Field Values
| Constructor Detail |
TextPathLayout
public TextPathLayout()
| Method Detail |
layoutGlyphVector
public static java.awt.Shape layoutGlyphVector(java.awt.font.GlyphVector glyphs, java.awt.Shape path, int align, float startOffset, float textLength, int lengthAdjustMode)
- Wraps the GlyphVector around the given path. The results
are mostly quite nice but you need to be careful choosing
the size of the font that created the GlyphVector, as
well as the "curvyness" of the path (really dynamic curves
don't look so great, abrupt changes/vertices look worse).
layoutGlyphVector
public static java.awt.Shape layoutGlyphVector(java.awt.font.GlyphVector glyphs, java.awt.Shape path, int align)
- Wraps the GlyphVector around the given path.
layoutGlyphVector
public static java.awt.Shape layoutGlyphVector(java.awt.font.GlyphVector glyphs, java.awt.Shape path)
- Wraps the GlyphVector around the given path.
|
|||||||||
| Home >> All >> org >> apache >> batik >> ext >> awt >> [ font overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.batik.ext.awt.font.TextPathLayout