jdk/src/share/classes/java/awt/font/TextLayout.java
changeset 21278 ef8a3a2a72f2
parent 11081 4a18889223e4
child 23010 6dadb192ad81
equal deleted inserted replaced
21277:bd380b80f9ea 21278:ef8a3a2a72f2
   221  * baseline-relative coordinates' (e.g. ascent, advance), and others
   221  * baseline-relative coordinates' (e.g. ascent, advance), and others
   222  * are in 'in standard coordinates' (e.g. getBounds).  Values in
   222  * are in 'in standard coordinates' (e.g. getBounds).  Values in
   223  * baseline-relative coordinates map the 'x' coordinate to the
   223  * baseline-relative coordinates map the 'x' coordinate to the
   224  * distance along the baseline, (positive x is forward along the
   224  * distance along the baseline, (positive x is forward along the
   225  * baseline), and the 'y' coordinate to a distance along the
   225  * baseline), and the 'y' coordinate to a distance along the
   226  * perpendicular to the baseline at 'x' (postitive y is 90 degrees
   226  * perpendicular to the baseline at 'x' (positive y is 90 degrees
   227  * clockwise from the baseline vector).  Values in standard
   227  * clockwise from the baseline vector).  Values in standard
   228  * coordinates are measured along the x and y axes, with 0,0 at the
   228  * coordinates are measured along the x and y axes, with 0,0 at the
   229  * origin of the TextLayout.  Documentation for each relevant API
   229  * origin of the TextLayout.  Documentation for each relevant API
   230  * indicates what values are in what coordinate system.  In general,
   230  * indicates what values are in what coordinate system.  In general,
   231  * measurement-related APIs are in baseline-relative coordinates,
   231  * measurement-related APIs are in baseline-relative coordinates,
   335          */
   335          */
   336         public TextHitInfo getStrongCaret(TextHitInfo hit1,
   336         public TextHitInfo getStrongCaret(TextHitInfo hit1,
   337                                           TextHitInfo hit2,
   337                                           TextHitInfo hit2,
   338                                           TextLayout layout) {
   338                                           TextLayout layout) {
   339 
   339 
   340             // default implmentation just calls private method on layout
   340             // default implementation just calls private method on layout
   341             return layout.getStrongHit(hit1, hit2);
   341             return layout.getStrongHit(hit1, hit2);
   342         }
   342         }
   343     }
   343     }
   344 
   344 
   345     /**
   345     /**
   910     /**
   910     /**
   911      * Returns the ascent of this <code>TextLayout</code>.
   911      * Returns the ascent of this <code>TextLayout</code>.
   912      * The ascent is the distance from the top (right) of the
   912      * The ascent is the distance from the top (right) of the
   913      * <code>TextLayout</code> to the baseline.  It is always either
   913      * <code>TextLayout</code> to the baseline.  It is always either
   914      * positive or zero.  The ascent is sufficient to
   914      * positive or zero.  The ascent is sufficient to
   915      * accomodate superscripted text and is the maximum of the sum of the
   915      * accommodate superscripted text and is the maximum of the sum of the
   916      * ascent, offset, and baseline of each glyph.  The ascent is
   916      * ascent, offset, and baseline of each glyph.  The ascent is
   917      * the maximum ascent from the baseline of all the text in the
   917      * the maximum ascent from the baseline of all the text in the
   918      * TextLayout.  It is in baseline-relative coordinates.
   918      * TextLayout.  It is in baseline-relative coordinates.
   919      * @return the ascent of this <code>TextLayout</code>.
   919      * @return the ascent of this <code>TextLayout</code>.
   920      */
   920      */
   925 
   925 
   926     /**
   926     /**
   927      * Returns the descent of this <code>TextLayout</code>.
   927      * Returns the descent of this <code>TextLayout</code>.
   928      * The descent is the distance from the baseline to the bottom (left) of
   928      * The descent is the distance from the baseline to the bottom (left) of
   929      * the <code>TextLayout</code>.  It is always either positive or zero.
   929      * the <code>TextLayout</code>.  It is always either positive or zero.
   930      * The descent is sufficient to accomodate subscripted text and is the
   930      * The descent is sufficient to accommodate subscripted text and is the
   931      * maximum of the sum of the descent, offset, and baseline of each glyph.
   931      * maximum of the sum of the descent, offset, and baseline of each glyph.
   932      * This is the maximum descent from the baseline of all the text in
   932      * This is the maximum descent from the baseline of all the text in
   933      * the TextLayout.  It is in baseline-relative coordinates.
   933      * the TextLayout.  It is in baseline-relative coordinates.
   934      * @return the descent of this <code>TextLayout</code>.
   934      * @return the descent of this <code>TextLayout</code>.
   935      */
   935      */