pageSize.getHeight()
);
// Step 0.
{
colors[0] = new DeviceRGBColor(30f/255, 10f/255, 0);
composer.setFillColor(colors[0]);
composer.setStrokeColor(colors[0]);
// Draw the page frame!
composer.drawRectangle(frame);
composer.stroke();
// Draw the lower-left corner mark!
composer.showText(
"Step 0",
new Point2D.Double(0,pageSize.getHeight()),
AlignmentXEnum.Left,
AlignmentYEnum.Bottom,
0
);
steps[0] = getStepNote(composer,"default");
}
// Step 1.
{
colors[1] = new DeviceRGBColor(80f/255, 25f/255, 0);
composer.setFillColor(colors[1]);
composer.setStrokeColor(colors[1]);
// Transform the coordinate space, applying translation!
composer.translate(72,72);
// Draw the page frame!
composer.drawRectangle(frame);
composer.stroke();
// Draw the lower-left corner mark!
composer.showText(
"Step 1",
new Point2D.Double(0,pageSize.getHeight()),
AlignmentXEnum.Left,
AlignmentYEnum.Bottom,
0
);
steps[1] = getStepNote(composer,"after translate(72,72)");
}
// Step 2.
{
colors[2] = new DeviceRGBColor(130f/255, 45f/255, 0);
composer.setFillColor(colors[2]);
composer.setStrokeColor(colors[2]);
// Transform the coordinate space, applying clockwise rotation!
composer.rotate(-20);
// Draw the page frame!
composer.drawRectangle(frame);
composer.stroke();
// Draw the coordinate space origin mark!
composer.showText("Origin 2");
// Draw the lower-left corner mark!
composer.showText(
"Step 2",
new Point2D.Double(0,pageSize.getHeight()),
AlignmentXEnum.Left,
AlignmentYEnum.Bottom,
0
);
steps[2] = getStepNote(composer,"after rotate(-20)");
}
// Step 3.
{
colors[3] = new DeviceRGBColor(180f/255, 60f/255, 0);
composer.setFillColor(colors[3]);
composer.setStrokeColor(colors[3]);
// Transform the coordinate space, applying translation and scaling!
composer.translate(0,72);
composer.scale(.5f,.5f);
// Draw the page frame!
composer.drawRectangle(frame);
composer.stroke();
// Draw the lower-left corner mark!
composer.showText(
"Step 3",
new Point2D.Double(0,pageSize.getHeight()),
AlignmentXEnum.Left,
AlignmentYEnum.Bottom,
0
);
steps[3] = getStepNote(composer,"after translate(0,72) and scale(.5,.5)");
}
// Step 4.
{
colors[4] = new DeviceRGBColor(230f/255, 75f/255, 0);
composer.setFillColor(colors[4]);
composer.setStrokeColor(colors[4]);
// Transform the coordinate space, restoring its initial CTM!
composer.add(