Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

RenderingHints

Anonymous edited this page · 2 revisions

Theory.

A rendering hint is just a map that let the effect know how it is expected to behave. For example, antialiasing-on tells the effect that it should apply antialiasing to the process.

Practice.

Using rendering hints.

Every single rendering hint is a map. All methods that accept rendering hints expects them to be at the end, so it can merge them easily.

If you are writing your own effect and you want to handle rendering hints, you can use create-rendering-hint for creating a RenderingHints object from a collection of them. Beware that it expects rendering hints, not a collection of them.

List of rendering hints.

  • Alpha interpolation:
    • alpha-interpolation-on
    • alpha-interpolation-off
    • alpha-interpolation-default
  • Antialiasing:
    • antialiasing-on
    • antialiasing-off
    • antialiasing-default
  • Color rendering:
    • color-rendering-quality
    • color-rendering-speed
    • color-rendering-default
  • Dithering:
    • dithering-enable
    • dithering-disable
    • dithering-default
  • Fractional metrics:
    • fractionalmetrics-on
    • fractionalmetrics-off
    • fractionalmetrics-default
  • Interpolation:
    • interpolation-bicubic
    • interpolation-bilinear
    • interpolation-nearest-neighbor
  • Stroke control:
    • stroke-control-normalize
    • stroke-control-pure
    • stroke-control-default
  • Text antialiasing:
    • text-antialiasing-on
    • text-antialiasing-off
    • text-antialiasing-default

For more info, please look at the RenderingHints documentation.

Something went wrong with that request. Please try again.