1 18 package org.apache.batik.extension.svg; 19 20 import java.awt.geom.Point2D ; 21 import java.text.AttributedCharacterIterator ; 22 23 import org.apache.batik.gvt.font.GVTGlyphVector; 24 25 29 public class LineInfo { 30 31 Point2D.Float loc; 32 AttributedCharacterIterator aci; 33 GVTGlyphVector gv; 34 int startIdx; 35 int endIdx; 36 float advance; 37 float visualAdvance; 38 float lastCharWidth; 39 float lineWidth; 40 boolean partial; 41 Point2D.Float verticalAlignOffset; 42 43 46 public LineInfo(Point2D.Float loc, 47 AttributedCharacterIterator aci, 48 GVTGlyphVector gv, 49 int startIdx, int endIdx, 50 float advance, 51 float visualAdvance, 52 float lastCharWidth, 53 float lineWidth, 54 boolean partial, 55 Point2D.Float verticalAlignOffset) { 56 this.loc = loc; 57 this.aci = aci; 58 this.gv = gv; 59 this.startIdx = startIdx; 60 this.endIdx = endIdx; 61 this.advance = advance; 62 this.visualAdvance = visualAdvance; 63 this.lastCharWidth = lastCharWidth; 64 this.lineWidth = lineWidth; 65 this.partial = partial; 66 this.verticalAlignOffset = verticalAlignOffset; 67 } 68 69 public Point2D.Float getLocation() { return loc; } 70 public AttributedCharacterIterator getACI() { return aci; } 71 public GVTGlyphVector getGlyphVector() { return gv; } 72 public int getStartIdx() { return startIdx; } 73 public int getEndIdx() { return endIdx; } 74 public float getAdvance() { return advance; } 75 public float getVisualAdvance() { return visualAdvance; } 76 public float getLastCharWidth() { return lastCharWidth; } 77 public float getLineWidth() { return lineWidth; } 78 public boolean isPartialLine() { return partial; } 79 public Point2D.Float getVerticalAlignOffset() { return verticalAlignOffset; } 80 81 public String toString() { 82 return ("[LineInfo loc: " + loc + 83 " [" + startIdx + "," + endIdx + "] " + 84 " LWidth: " + lineWidth + 85 " Adv: " + advance + " VAdv: " + visualAdvance + 86 " LCW: " + lastCharWidth + 87 " Partial: " + partial + 88 " verticalAlignOffset: " + verticalAlignOffset); 89 } 90 91 } 92 | Popular Tags |