Example usage for java.awt RenderingHints VALUE_TEXT_ANTIALIAS_LCD_HRGB

List of usage examples for java.awt RenderingHints VALUE_TEXT_ANTIALIAS_LCD_HRGB

Introduction

In this page you can find the example usage for java.awt RenderingHints VALUE_TEXT_ANTIALIAS_LCD_HRGB.

Prototype

Object VALUE_TEXT_ANTIALIAS_LCD_HRGB

To view the source code for java.awt RenderingHints VALUE_TEXT_ANTIALIAS_LCD_HRGB.

Click Source Link

Document

Text antialiasing hint value -- request that text be displayed optimised for an LCD display with subpixels in order from display left to right of R,G,B such that the horizontal subpixel resolution is three times that of the full pixel horizontal resolution (HRGB).

Usage

From source file:org.tros.torgo.Main.java

/**
 * Initialize the splash graphic./*from  ww w. j av a 2  s .  c  o  m*/
 */
private static void splashInit() {
    mySplash = SplashScreen.getSplashScreen();
    if (mySplash != null) {
        try {
            // if there are any problems displaying the splash this will be null
            splashDimension = mySplash.getSize();
            splashImage = ImageIO.read(mySplash.getImageURL());

            // create the Graphics environment for drawing status info
            splashGraphics = mySplash.createGraphics();
            font = new Font(Font.SANS_SERIF, Font.PLAIN, 16);
            splashGraphics.setFont(font);
            splashGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                    RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);

            // initialize the status info
            splashText("Starting");
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}