Java Reference
In-Depth Information
Figure 7-16. The rendering process reveals that stroke, font, and paint attributes don't
apply to images.
Graphicsprimitives arepresentedtotherenderingpipelineviavariousmethodcalls
that determine how the rendering proceeds:
• Shapes passed to fill() are not stroked. Instead, they are first transformed
and eventually painted (filled).
• Shapespassedto draw() arefirststrokedandtheresultingoutlineshapesare
• Text characters are first converted to the shapes specified by the current font.
These character shapes are then transformed.
• Image outlines are first transformed.
As Figure 7-16 shows, Graphics2D only fills shapes and draws images. Drawing
outline shapes and character shapes are variants of the shape-filling operation.
Rasterizing follows the transformation step. The rasterizer converts vector-based
shapes to alpha (coverage) values that determine how much of each destination pixel
underlying the shape is covered by the shape. Regarding images, only image outlines
are rasterized. The rasterizer takes any specified rendering hints into account.
The rasterized results are clipped via the current clipping shape. Those portions of
not colorized because their pixels provide the colors.
Search WWH ::

Custom Search