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

Print this page




 938      * Note that different normalization algorithms may be more
 939      * successful than others for given input paths.
 940      *
 941      * @see #KEY_STROKE_CONTROL
 942      * @since 1.3
 943      */
 944     public static final Object VALUE_STROKE_NORMALIZE =
 945         SunHints.VALUE_STROKE_NORMALIZE;
 946 
 947     /**
 948      * Stroke normalization control hint value -- geometry should
 949      * be left unmodified and rendered with sub-pixel accuracy.
 950      *
 951      * @see #KEY_STROKE_CONTROL
 952      * @since 1.3
 953      */
 954     public static final Object VALUE_STROKE_PURE =
 955         SunHints.VALUE_STROKE_PURE;
 956 
 957     /**












































 958      * Constructs a new object with keys and values initialized
 959      * from the specified Map object which may be null.
 960      * @param init a map of key/value pairs to initialize the hints
 961      *          or null if the object should be empty
 962      */
 963     public RenderingHints(Map<Key,?> init) {
 964         if (init != null) {
 965             hintmap.putAll(init);
 966         }
 967     }
 968 
 969     /**
 970      * Constructs a new object with the specified key/value pair.
 971      * @param key the key of the particular hint property
 972      * @param value the value of the hint property specified with
 973      * <code>key</code>
 974      */
 975     public RenderingHints(Key key, Object value) {
 976         hintmap.put(key, value);
 977     }




 938      * Note that different normalization algorithms may be more
 939      * successful than others for given input paths.
 940      *
 941      * @see #KEY_STROKE_CONTROL
 942      * @since 1.3
 943      */
 944     public static final Object VALUE_STROKE_NORMALIZE =
 945         SunHints.VALUE_STROKE_NORMALIZE;
 946 
 947     /**
 948      * Stroke normalization control hint value -- geometry should
 949      * be left unmodified and rendered with sub-pixel accuracy.
 950      *
 951      * @see #KEY_STROKE_CONTROL
 952      * @since 1.3
 953      */
 954     public static final Object VALUE_STROKE_PURE =
 955         SunHints.VALUE_STROKE_PURE;
 956 
 957     /**
 958      * Image resolution variant hint key.
 959      * The {@code RESOLUTION_VARIANT} hint controls which image resolution
 960      * variant should be chosen for image drawing.
 961      *
 962      * <ul>
 963      * <li>{@link #VALUE_RESOLUTION_VARIANT_DEFAULT}
 964      * <li>{@link #VALUE_RESOLUTION_VARIANT_OFF}
 965      * <li>{@link #VALUE_RESOLUTION_VARIANT_ON}
 966      * </ul>
 967      * @since 1.9
 968      */
 969     public static final Key KEY_RESOLUTION_VARIANT =
 970         SunHints.KEY_RESOLUTION_VARIANT;
 971 
 972     /**
 973      * Image resolution variant hint value -- image resolution variant is chosen
 974      * based on a default heuristic.
 975      *
 976      * @see #KEY_RESOLUTION_VARIANT
 977      * @since 1.9
 978      */
 979     public static final Object VALUE_RESOLUTION_VARIANT_DEFAULT =
 980         SunHints.VALUE_RESOLUTION_VARIANT_DEFAULT;
 981     /**
 982      * Image resolution variant hint value -- the standard resolution of an image
 983      * is always used.
 984      *
 985      * @see #KEY_RESOLUTION_VARIANT
 986      * @since 1.9
 987      */
 988     public static final Object VALUE_RESOLUTION_VARIANT_OFF =
 989         SunHints.VALUE_RESOLUTION_VARIANT_OFF;
 990 
 991     /**
 992      * Image resolution variant hint value -- the resolution-specific variant
 993      * of images is always used.
 994      *
 995      * @see #KEY_RESOLUTION_VARIANT
 996      * @since 1.9
 997      */
 998     public static final Object VALUE_RESOLUTION_VARIANT_ON =
 999         SunHints.VALUE_RESOLUTION_VARIANT_ON;
1000 
1001     /**
1002      * Constructs a new object with keys and values initialized
1003      * from the specified Map object which may be null.
1004      * @param init a map of key/value pairs to initialize the hints
1005      *          or null if the object should be empty
1006      */
1007     public RenderingHints(Map<Key,?> init) {
1008         if (init != null) {
1009             hintmap.putAll(init);
1010         }
1011     }
1012 
1013     /**
1014      * Constructs a new object with the specified key/value pair.
1015      * @param key the key of the particular hint property
1016      * @param value the value of the hint property specified with
1017      * <code>key</code>
1018      */
1019     public RenderingHints(Key key, Object value) {
1020         hintmap.put(key, value);
1021     }