Path represents a path consisting of pen movement commands. Currently, moveTo, lineTo and close commands are supported. The moveTo and lineTo commands support both relative and absolute coordinates.
The code below creates a path drawing a 100 x 100 pixels rectangle at the position (50, 50):
Path path = new Path(50, 50); path.lineRelativelyTo(100, 0); path.lineRelativelyTo(0, 100); path.lineRelativelyTo(-100, 0); path.close();
This rectangle is modified as a triangle with the following code:
path.setStep(2, new LineTo(true, -50, 100)); path.removeStep(3);
@author Henri Kerola / IT Mill Ltd