src/java.desktop/share/classes/java/awt/RenderingHints.java

Print this page




 653          SunHints.VALUE_FRACTIONALMETRICS_ON;
 654 
 655     /**
 656      * Font fractional metrics hint value -- character glyphs are
 657      * positioned with accuracy chosen by the implementation.
 658      * @see #KEY_FRACTIONALMETRICS
 659      */
 660     public static final Object VALUE_FRACTIONALMETRICS_DEFAULT =
 661          SunHints.VALUE_FRACTIONALMETRICS_DEFAULT;
 662 
 663     /**
 664      * Interpolation hint key.
 665      * The {@code INTERPOLATION} hint controls how image pixels are
 666      * filtered or resampled during an image rendering operation.
 667      * <p>
 668      * Implicitly images are defined to provide color samples at
 669      * integer coordinate locations.
 670      * When images are rendered upright with no scaling onto a
 671      * destination, the choice of which image pixels map to which
 672      * device pixels is obvious and the samples at the integer
 673      * coordinate locations in the image are transfered to the
 674      * pixels at the corresponding integer locations on the device
 675      * pixel grid one for one.
 676      * When images are rendered in a scaled, rotated, or otherwise
 677      * transformed coordinate system, then the mapping of device
 678      * pixel coordinates back to the image can raise the question
 679      * of what color sample to use for the continuous coordinates
 680      * that lie between the integer locations of the provided image
 681      * samples.
 682      * Interpolation algorithms define functions which provide a
 683      * color sample for any continuous coordinate in an image based
 684      * on the color samples at the surrounding integer coordinates.
 685      * <p>
 686      * The allowable values for this hint are
 687      * <ul>
 688      * <li>{@link #VALUE_INTERPOLATION_NEAREST_NEIGHBOR}
 689      * <li>{@link #VALUE_INTERPOLATION_BILINEAR}
 690      * <li>{@link #VALUE_INTERPOLATION_BICUBIC}
 691      * </ul>
 692      */
 693     public static final Key KEY_INTERPOLATION =


1150      * <code>RenderingHints</code> are reflected in the <code>Set</code>,
1151      * and vice-versa.  If the <code>RenderingHints</code> is modified
1152      * while an iteration over the <code>Set</code> is in progress,
1153      * the results of the iteration are undefined.  The <code>Set</code>
1154      * supports element removal, which removes the corresponding
1155      * mapping from the <code>RenderingHints</code>, via the
1156      * <code>Iterator.remove</code>, <code>Set.remove</code>,
1157      * <code>removeAll</code> <code>retainAll</code>, and
1158      * <code>clear</code> operations.  It does not support
1159      * the <code>add</code> or <code>addAll</code> operations.
1160      *
1161      * @return a <code>Set</code> view of the keys contained
1162      * in this <code>RenderingHints</code>.
1163      */
1164     public Set<Object> keySet() {
1165         return hintmap.keySet();
1166     }
1167 
1168     /**
1169      * Returns a <code>Collection</code> view of the values
1170      * contained in this <code>RenderinHints</code>.
1171      * The <code>Collection</code> is backed by the
1172      * <code>RenderingHints</code>, so changes to
1173      * the <code>RenderingHints</code> are reflected in
1174      * the <code>Collection</code>, and vice-versa.
1175      * If the <code>RenderingHints</code> is modified while
1176      * an iteration over the <code>Collection</code> is
1177      * in progress, the results of the iteration are undefined.
1178      * The <code>Collection</code> supports element removal,
1179      * which removes the corresponding mapping from the
1180      * <code>RenderingHints</code>, via the
1181      * <code>Iterator.remove</code>,
1182      * <code>Collection.remove</code>, <code>removeAll</code>,
1183      * <code>retainAll</code> and <code>clear</code> operations.
1184      * It does not support the <code>add</code> or
1185      * <code>addAll</code> operations.
1186      *
1187      * @return a <code>Collection</code> view of the values
1188      *          contained in this <code>RenderingHints</code>.
1189      */
1190     public Collection<Object> values() {




 653          SunHints.VALUE_FRACTIONALMETRICS_ON;
 654 
 655     /**
 656      * Font fractional metrics hint value -- character glyphs are
 657      * positioned with accuracy chosen by the implementation.
 658      * @see #KEY_FRACTIONALMETRICS
 659      */
 660     public static final Object VALUE_FRACTIONALMETRICS_DEFAULT =
 661          SunHints.VALUE_FRACTIONALMETRICS_DEFAULT;
 662 
 663     /**
 664      * Interpolation hint key.
 665      * The {@code INTERPOLATION} hint controls how image pixels are
 666      * filtered or resampled during an image rendering operation.
 667      * <p>
 668      * Implicitly images are defined to provide color samples at
 669      * integer coordinate locations.
 670      * When images are rendered upright with no scaling onto a
 671      * destination, the choice of which image pixels map to which
 672      * device pixels is obvious and the samples at the integer
 673      * coordinate locations in the image are transferred to the
 674      * pixels at the corresponding integer locations on the device
 675      * pixel grid one for one.
 676      * When images are rendered in a scaled, rotated, or otherwise
 677      * transformed coordinate system, then the mapping of device
 678      * pixel coordinates back to the image can raise the question
 679      * of what color sample to use for the continuous coordinates
 680      * that lie between the integer locations of the provided image
 681      * samples.
 682      * Interpolation algorithms define functions which provide a
 683      * color sample for any continuous coordinate in an image based
 684      * on the color samples at the surrounding integer coordinates.
 685      * <p>
 686      * The allowable values for this hint are
 687      * <ul>
 688      * <li>{@link #VALUE_INTERPOLATION_NEAREST_NEIGHBOR}
 689      * <li>{@link #VALUE_INTERPOLATION_BILINEAR}
 690      * <li>{@link #VALUE_INTERPOLATION_BICUBIC}
 691      * </ul>
 692      */
 693     public static final Key KEY_INTERPOLATION =


1150      * <code>RenderingHints</code> are reflected in the <code>Set</code>,
1151      * and vice-versa.  If the <code>RenderingHints</code> is modified
1152      * while an iteration over the <code>Set</code> is in progress,
1153      * the results of the iteration are undefined.  The <code>Set</code>
1154      * supports element removal, which removes the corresponding
1155      * mapping from the <code>RenderingHints</code>, via the
1156      * <code>Iterator.remove</code>, <code>Set.remove</code>,
1157      * <code>removeAll</code> <code>retainAll</code>, and
1158      * <code>clear</code> operations.  It does not support
1159      * the <code>add</code> or <code>addAll</code> operations.
1160      *
1161      * @return a <code>Set</code> view of the keys contained
1162      * in this <code>RenderingHints</code>.
1163      */
1164     public Set<Object> keySet() {
1165         return hintmap.keySet();
1166     }
1167 
1168     /**
1169      * Returns a <code>Collection</code> view of the values
1170      * contained in this <code>RenderingHints</code>.
1171      * The <code>Collection</code> is backed by the
1172      * <code>RenderingHints</code>, so changes to
1173      * the <code>RenderingHints</code> are reflected in
1174      * the <code>Collection</code>, and vice-versa.
1175      * If the <code>RenderingHints</code> is modified while
1176      * an iteration over the <code>Collection</code> is
1177      * in progress, the results of the iteration are undefined.
1178      * The <code>Collection</code> supports element removal,
1179      * which removes the corresponding mapping from the
1180      * <code>RenderingHints</code>, via the
1181      * <code>Iterator.remove</code>,
1182      * <code>Collection.remove</code>, <code>removeAll</code>,
1183      * <code>retainAll</code> and <code>clear</code> operations.
1184      * It does not support the <code>add</code> or
1185      * <code>addAll</code> operations.
1186      *
1187      * @return a <code>Collection</code> view of the values
1188      *          contained in this <code>RenderingHints</code>.
1189      */
1190     public Collection<Object> values() {