001 /*
002 *
003 * QualityHints.java version 0.1
004 *
005 * Copyright (C) 2008 Piet Blok.
006 *
007 * Licensed under the Apache License, Version 2.0 (the "License");
008 * you may not use this file except in compliance with the License.
009 * You may obtain a copy of the License at
010 *
011 * http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing, software
014 * distributed under the License is distributed on an "AS IS" BASIS,
015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
016 * See the License for the specific language governing permissions and
017 * limitations under the License.
018 *
019 * Created on 20 jan 2008
020 */
021
022 package org.pbjar.jxlayer.demo;
023
024 import java.awt.RenderingHints;
025 import java.util.HashMap;
026
027 /**
028 * Rendering hints for quality rendering.
029 *
030 * @author Piet Blok
031 */
032 public class QualityHints extends HashMap<RenderingHints.Key,Object> {
033
034 private static final long serialVersionUID = 1L;
035
036 /**
037 * Construct an instance, populated with the appropriate key value pairs.
038 */
039 public QualityHints() {
040
041 put(RenderingHints.KEY_ALPHA_INTERPOLATION,
042 RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
043
044 put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
045
046 put(RenderingHints.KEY_COLOR_RENDERING,
047 RenderingHints.VALUE_COLOR_RENDER_QUALITY);
048
049 put(RenderingHints.KEY_DITHERING, RenderingHints.VALUE_DITHER_ENABLE);
050
051 put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
052
053 put(RenderingHints.KEY_TEXT_ANTIALIASING,
054 RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
055 }
056
057 }