1 18 19 package org.apache.batik.gvt.text; 20 21 import java.awt.Graphics2D ; 22 import java.awt.Shape ; 23 import java.awt.geom.Point2D ; 24 import java.awt.geom.Rectangle2D ; 25 26 import org.apache.batik.gvt.font.GVTGlyphMetrics; 27 import org.apache.batik.gvt.font.GVTGlyphVector; 28 29 42 public interface TextSpanLayout { 43 44 public int DECORATION_UNDERLINE = 0x1; 45 public int DECORATION_STRIKETHROUGH = 0x2; 46 public int DECORATION_OVERLINE = 0x4; 47 public int DECORATION_ALL = DECORATION_UNDERLINE | 48 DECORATION_OVERLINE | 49 DECORATION_STRIKETHROUGH; 50 51 56 public void draw(Graphics2D g2d); 57 58 66 public Shape getDecorationOutline(int decorationType); 67 68 73 public Rectangle2D getBounds2D(); 74 75 79 public Rectangle2D getGeometricBounds(); 80 81 85 public Shape getOutline(); 86 87 93 public Point2D getAdvance2D(); 94 95 98 public float [] getGlyphAdvances(); 99 100 103 public GVTGlyphMetrics getGlyphMetrics(int glyphIndex); 104 105 public Point2D getTextPathAdvance(); 106 107 112 public Point2D getOffset(); 113 114 123 public void setScale(float xScale, float yScale, boolean adjSpacing); 124 125 131 public void setOffset(Point2D offset); 132 133 141 public Shape getHighlightShape(int beginCharIndex, int endCharIndex); 142 143 151 public TextHit hitTestChar(float x, float y); 152 153 156 public boolean isVertical(); 157 158 161 public boolean isOnATextPath(); 162 163 166 public int getGlyphCount(); 167 168 175 public int getCharacterCount(int startGlyphIndex, int endGlyphIndex); 176 177 185 public int getGlyphIndex(int charIndex); 186 187 190 public boolean isLeftToRight(); 191 192 199 public boolean hasCharacterIndex(int index); 200 201 202 207 public GVTGlyphVector getGlyphVector(); 208 209 216 public double getComputedOrientationAngle(int index); 217 218 222 public boolean isAltGlyph(); 223 } 224 | Popular Tags |