src/share/classes/sun/awt/SunHints.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 24,43 **** */ package sun.awt; import java.awt.RenderingHints; ! import javax.tools.annotation.GenerateNativeHeader; /** * This class contains rendering hints that can be used by the * {@link java.awt.Graphics2D} class, and classes that implement * {@link java.awt.image.BufferedImageOp} and * {@link java.awt.image.Raster}. */ - /* No native methods here, but the constants are needed in the supporting JNI code */ - @GenerateNativeHeader public class SunHints { /** * Defines the type of all keys used to control various * aspects of the rendering and imaging pipelines. Instances * of this class are immutable and unique which means that --- 24,41 ---- */ package sun.awt; import java.awt.RenderingHints; ! import java.lang.annotation.Native; /** * This class contains rendering hints that can be used by the * {@link java.awt.Graphics2D} class, and classes that implement * {@link java.awt.image.BufferedImageOp} and * {@link java.awt.image.Raster}. */ public class SunHints { /** * Defines the type of all keys used to control various * aspects of the rendering and imaging pipelines. Instances * of this class are immutable and unique which means that
*** 178,267 **** private static final int VALS_PER_KEY = 8; /** * Rendering hint key and values */ ! public static final int INTKEY_RENDERING = 0; ! public static final int INTVAL_RENDER_DEFAULT = 0; ! public static final int INTVAL_RENDER_SPEED = 1; ! public static final int INTVAL_RENDER_QUALITY = 2; /** * Antialiasing hint key and values */ ! public static final int INTKEY_ANTIALIASING = 1; ! public static final int INTVAL_ANTIALIAS_DEFAULT = 0; ! public static final int INTVAL_ANTIALIAS_OFF = 1; ! public static final int INTVAL_ANTIALIAS_ON = 2; /** * Text antialiasing hint key and values */ ! public static final int INTKEY_TEXT_ANTIALIASING = 2; ! public static final int INTVAL_TEXT_ANTIALIAS_DEFAULT = 0; ! public static final int INTVAL_TEXT_ANTIALIAS_OFF = 1; ! public static final int INTVAL_TEXT_ANTIALIAS_ON = 2; ! public static final int INTVAL_TEXT_ANTIALIAS_GASP = 3; ! public static final int INTVAL_TEXT_ANTIALIAS_LCD_HRGB = 4; ! public static final int INTVAL_TEXT_ANTIALIAS_LCD_HBGR = 5; ! public static final int INTVAL_TEXT_ANTIALIAS_LCD_VRGB = 6; ! public static final int INTVAL_TEXT_ANTIALIAS_LCD_VBGR = 7; /** * Font fractional metrics hint key and values */ ! public static final int INTKEY_FRACTIONALMETRICS = 3; ! public static final int INTVAL_FRACTIONALMETRICS_DEFAULT = 0; ! public static final int INTVAL_FRACTIONALMETRICS_OFF = 1; ! public static final int INTVAL_FRACTIONALMETRICS_ON = 2; /** * Dithering hint key and values */ ! public static final int INTKEY_DITHERING = 4; ! public static final int INTVAL_DITHER_DEFAULT = 0; ! public static final int INTVAL_DITHER_DISABLE = 1; ! public static final int INTVAL_DITHER_ENABLE = 2; /** * Interpolation hint key and values */ ! public static final int INTKEY_INTERPOLATION = 5; ! public static final int INTVAL_INTERPOLATION_NEAREST_NEIGHBOR = 0; ! public static final int INTVAL_INTERPOLATION_BILINEAR = 1; ! public static final int INTVAL_INTERPOLATION_BICUBIC = 2; /** * Alpha interpolation hint key and values */ ! public static final int INTKEY_ALPHA_INTERPOLATION = 6; ! public static final int INTVAL_ALPHA_INTERPOLATION_DEFAULT = 0; ! public static final int INTVAL_ALPHA_INTERPOLATION_SPEED = 1; ! public static final int INTVAL_ALPHA_INTERPOLATION_QUALITY = 2; /** * Color rendering hint key and values */ ! public static final int INTKEY_COLOR_RENDERING = 7; ! public static final int INTVAL_COLOR_RENDER_DEFAULT = 0; ! public static final int INTVAL_COLOR_RENDER_SPEED = 1; ! public static final int INTVAL_COLOR_RENDER_QUALITY = 2; /** * Stroke normalization control hint key and values */ ! public static final int INTKEY_STROKE_CONTROL = 8; ! public static final int INTVAL_STROKE_DEFAULT = 0; ! public static final int INTVAL_STROKE_NORMALIZE = 1; ! public static final int INTVAL_STROKE_PURE = 2; /** * LCD text contrast control hint key. * Value is "100" to make discontiguous with the others which * are all enumerative and are of a different class. */ ! public static final int INTKEY_AATEXT_LCD_CONTRAST = 100; /** * Rendering hint key and value objects */ public static final Key KEY_RENDERING = --- 176,265 ---- private static final int VALS_PER_KEY = 8; /** * Rendering hint key and values */ ! @Native public static final int INTKEY_RENDERING = 0; ! @Native public static final int INTVAL_RENDER_DEFAULT = 0; ! @Native public static final int INTVAL_RENDER_SPEED = 1; ! @Native public static final int INTVAL_RENDER_QUALITY = 2; /** * Antialiasing hint key and values */ ! @Native public static final int INTKEY_ANTIALIASING = 1; ! @Native public static final int INTVAL_ANTIALIAS_DEFAULT = 0; ! @Native public static final int INTVAL_ANTIALIAS_OFF = 1; ! @Native public static final int INTVAL_ANTIALIAS_ON = 2; /** * Text antialiasing hint key and values */ ! @Native public static final int INTKEY_TEXT_ANTIALIASING = 2; ! @Native public static final int INTVAL_TEXT_ANTIALIAS_DEFAULT = 0; ! @Native public static final int INTVAL_TEXT_ANTIALIAS_OFF = 1; ! @Native public static final int INTVAL_TEXT_ANTIALIAS_ON = 2; ! @Native public static final int INTVAL_TEXT_ANTIALIAS_GASP = 3; ! @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_HRGB = 4; ! @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_HBGR = 5; ! @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_VRGB = 6; ! @Native public static final int INTVAL_TEXT_ANTIALIAS_LCD_VBGR = 7; /** * Font fractional metrics hint key and values */ ! @Native public static final int INTKEY_FRACTIONALMETRICS = 3; ! @Native public static final int INTVAL_FRACTIONALMETRICS_DEFAULT = 0; ! @Native public static final int INTVAL_FRACTIONALMETRICS_OFF = 1; ! @Native public static final int INTVAL_FRACTIONALMETRICS_ON = 2; /** * Dithering hint key and values */ ! @Native public static final int INTKEY_DITHERING = 4; ! @Native public static final int INTVAL_DITHER_DEFAULT = 0; ! @Native public static final int INTVAL_DITHER_DISABLE = 1; ! @Native public static final int INTVAL_DITHER_ENABLE = 2; /** * Interpolation hint key and values */ ! @Native public static final int INTKEY_INTERPOLATION = 5; ! @Native public static final int INTVAL_INTERPOLATION_NEAREST_NEIGHBOR = 0; ! @Native public static final int INTVAL_INTERPOLATION_BILINEAR = 1; ! @Native public static final int INTVAL_INTERPOLATION_BICUBIC = 2; /** * Alpha interpolation hint key and values */ ! @Native public static final int INTKEY_ALPHA_INTERPOLATION = 6; ! @Native public static final int INTVAL_ALPHA_INTERPOLATION_DEFAULT = 0; ! @Native public static final int INTVAL_ALPHA_INTERPOLATION_SPEED = 1; ! @Native public static final int INTVAL_ALPHA_INTERPOLATION_QUALITY = 2; /** * Color rendering hint key and values */ ! @Native public static final int INTKEY_COLOR_RENDERING = 7; ! @Native public static final int INTVAL_COLOR_RENDER_DEFAULT = 0; ! @Native public static final int INTVAL_COLOR_RENDER_SPEED = 1; ! @Native public static final int INTVAL_COLOR_RENDER_QUALITY = 2; /** * Stroke normalization control hint key and values */ ! @Native public static final int INTKEY_STROKE_CONTROL = 8; ! @Native public static final int INTVAL_STROKE_DEFAULT = 0; ! @Native public static final int INTVAL_STROKE_NORMALIZE = 1; ! @Native public static final int INTVAL_STROKE_PURE = 2; /** * LCD text contrast control hint key. * Value is "100" to make discontiguous with the others which * are all enumerative and are of a different class. */ ! @Native public static final int INTKEY_AATEXT_LCD_CONTRAST = 100; /** * Rendering hint key and value objects */ public static final Key KEY_RENDERING =