Home Segments Top Top Previous Next

1122: Mainline

So far, the Graphics2D graphics context—the one used in Segment 1121—exhibits no special advantage relative to the Graphics graphics context used in Segment 1113. However, an advantage emerges immediately if you wish to transform a drawing, because Graphics2D instances can be told to apply one or more of the transformations known in mathematics as the affine transformations.

The affine transformations include, as special cases, all translations, rotations, flips, and changes of scale.