Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
Programming

Smoothing

 

Graphics

Smoothing

We can improve our images by smoothing. This reduces the ugly "pixelated" quality of the images.

1. [ Java ] Smoothing


Big

The first line is drawn without smoothing, the second is smoothed.

We set the smoothing on - after this all the drawing operations are slower, but better.

See Graphics2D RenderingHints for the bewildering variety of options available.

  g.setRenderingHint(
    RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);