Sets the given graphics object to draw with anti-aliasing and other beautiful options. - Java 2D Graphics

Java examples for 2D Graphics:Graphics

Description

Sets the given graphics object to draw with anti-aliasing and other beautiful options.

Demo Code


//package com.java2s;

import java.awt.Graphics2D;
import java.awt.RenderingHints;

public class Main {
    private static RenderingHints BEAUTIFUL_RENDER_HINTS = new RenderingHints(
            null);//from www .ja v  a2  s  . co m

    /** Sets the given graphics object to draw with anti-aliasing and other beautiful options. */
    public static void setBeautifulRendering(Graphics2D g) {
        g.setRenderingHints(BEAUTIFUL_RENDER_HINTS);
    }
}

Related Tutorials