| 1 16 17 package swingwt.awt.font; 18 19 public class LineMetrics { 20 21 private int numChars = 0; 22 private float ascent = 0; 23 private float descent = 0; 24 private float leading = 0; 25 private float height = 0; 26 private int baselineindex = 0; 27 private float[] baselineoffsets = null; 28 private float strikethroughoffset = 0; 29 private float strikethroughthickness = 1; 30 private float underlineoffset = 1; 31 private float underlinethickness = 1; 32 33 public LineMetrics(int numChars, int height) { this.numChars = numChars; this.height = height; strikethroughoffset = height / 2; } 34 35 public int getNumChars() { return numChars; } 36 public float getAscent() { return ascent; } 37 public float getDescent() { return descent; } 38 public float getLeading() { return leading; } 39 public float getHeight() { return height; } 40 public int getBaselineIndex() { return baselineindex; } 41 public float[] getBaselineOffsets() { return baselineoffsets; } 42 public float getStrikethroughOffset() { return strikethroughoffset; } 43 public float getStrikethroughThickness() { return strikethroughthickness; } 44 public float getUnderlineOffset() { return underlineoffset; } 45 public float getUnderlineThickness() { return underlinethickness; } 46 } 47 | Popular Tags |