src/share/classes/java/awt/font/TextLine.java

Print this page




  33 import java.awt.Color;
  34 import java.awt.Font;
  35 import java.awt.Graphics2D;
  36 import java.awt.Rectangle;
  37 import java.awt.Shape;
  38 import java.awt.geom.AffineTransform;
  39 import java.awt.geom.GeneralPath;
  40 import java.awt.geom.Point2D;
  41 import java.awt.geom.Rectangle2D;
  42 import java.awt.im.InputMethodHighlight;
  43 import java.awt.image.BufferedImage;
  44 import java.text.Annotation;
  45 import java.text.AttributedCharacterIterator;
  46 import java.text.AttributedCharacterIterator.Attribute;
  47 import java.text.Bidi;
  48 import java.text.CharacterIterator;
  49 import java.util.Hashtable;
  50 import java.util.Map;
  51 import sun.font.AttributeValues;
  52 import sun.font.BidiUtils;

  53 import sun.font.CoreMetrics;
  54 import sun.font.Decoration;
  55 import sun.font.FontLineMetrics;
  56 import sun.font.FontResolver;
  57 import sun.font.GraphicComponent;
  58 import sun.font.LayoutPathImpl;
  59 import sun.font.LayoutPathImpl.EmptyPath;
  60 import sun.font.LayoutPathImpl.SegmentPathBuilder;
  61 import sun.font.TextLabelFactory;
  62 import sun.font.TextLineComponent;
  63 import sun.text.CodePointIterator;
  64 
  65 import java.awt.geom.Line2D;
  66 
  67 final class TextLine {
  68 
  69     static final class TextLineMetrics {
  70         public final float ascent;
  71         public final float descent;
  72         public final float leading;
  73         public final float advance;
  74 
  75         public TextLineMetrics(float ascent,
  76                            float descent,
  77                            float leading,
  78                            float advance) {
  79             this.ascent = ascent;
  80             this.descent = descent;
  81             this.leading = leading;
  82             this.advance = advance;
  83         }




  33 import java.awt.Color;
  34 import java.awt.Font;
  35 import java.awt.Graphics2D;
  36 import java.awt.Rectangle;
  37 import java.awt.Shape;
  38 import java.awt.geom.AffineTransform;
  39 import java.awt.geom.GeneralPath;
  40 import java.awt.geom.Point2D;
  41 import java.awt.geom.Rectangle2D;
  42 import java.awt.im.InputMethodHighlight;
  43 import java.awt.image.BufferedImage;
  44 import java.text.Annotation;
  45 import java.text.AttributedCharacterIterator;
  46 import java.text.AttributedCharacterIterator.Attribute;
  47 import java.text.Bidi;
  48 import java.text.CharacterIterator;
  49 import java.util.Hashtable;
  50 import java.util.Map;
  51 import sun.font.AttributeValues;
  52 import sun.font.BidiUtils;
  53 import sun.font.CodePointIterator;
  54 import sun.font.CoreMetrics;
  55 import sun.font.Decoration;
  56 import sun.font.FontLineMetrics;
  57 import sun.font.FontResolver;
  58 import sun.font.GraphicComponent;
  59 import sun.font.LayoutPathImpl;
  60 import sun.font.LayoutPathImpl.EmptyPath;
  61 import sun.font.LayoutPathImpl.SegmentPathBuilder;
  62 import sun.font.TextLabelFactory;
  63 import sun.font.TextLineComponent;

  64 
  65 import java.awt.geom.Line2D;
  66 
  67 final class TextLine {
  68 
  69     static final class TextLineMetrics {
  70         public final float ascent;
  71         public final float descent;
  72         public final float leading;
  73         public final float advance;
  74 
  75         public TextLineMetrics(float ascent,
  76                            float descent,
  77                            float leading,
  78                            float advance) {
  79             this.ascent = ascent;
  80             this.descent = descent;
  81             this.leading = leading;
  82             this.advance = advance;
  83         }