OOF2: The Manual

Name

OOF.Graphics_n.Settings.Antialias — Use antialiased rendering.

Synopsis

OOF.Graphics_n.Settings.Antialias(boolean)

Details

  • Parent Menu: OOF.Graphics_n.Settings
  • Callback: function GhostGfxWindow.toggleAntialias in module ooflib.common.IO.ghostgfxwindow
  • Parameters:

    boolean
    A boolean value, 0 (false) or 1 (true). This is not a keyword parameter (just enter '0' or '1', not 'boolean=1').

Description

Aliasing is what happens when you try to draw small objects on a computer screen where the size of the pixels is comparable to the size of the objects. The Skeleton edges shown in Figure 6.7 are one pixel wide, and the diagonals are not smoothly drawn. Antialiasing is a method for removing aliasing by making pixels bleed color into their neighbors, as shown in Figure 6.8.

Figure 6.7. Aliasing

Aliasing
The effects of aliasing. Observe the jagged portions of the diagonal skeleton edges.

Figure 6.8. Antialiasing

Antialiasing
The same skeleton with antialiasing turned on. The jagged lines are smooth, but everything is slightly blurry.

Antialiasing can make line drawings look better, but it can cause problems when displaying filled polygons (e.g, SkeletonMaterialDisplay or FilledContourDisplay). When the antialiasing algorithm attempts to smooth diagonal edges of adjacent polygons, it can leave some space in between, as shown in Figure 6.9. For this reason, as well as because it can consume a fair amount of cpu time, antialiasing is off by default in OOF2.

Figure 6.9. Antialiasing Filled Polygons

Antialiasing Filled Polygons

An antialiased display of filled polygons (SkeletonMaterialDisplay). Boundaries between the polygons are visible.

Antialiasing Filled Polygons

A nonantialiased (i.e, aliased) version of the same region.