(1) Graphics Processing
New Subclass of Graphics -> Graphics2D.
Drawing in Java involves 3 steps :
- Specify the drawing attributes :
- setColor(), setFont(), setPaintMode(), setXORMode().
- Identify the Shape sh to draw :
- Line2D, Rectangle2D, RoundRectangle2D, Ellipse2D, QuadCurve2D, CubicCurve2D, Arc2D, GeneralPath.
- Draw it :
- draw(sh) -> uses the current Stroke,
- fill(sh) -> uses the current Paint.
Transformations & Compositing available.