final BlockComposer blockComposer = new BlockComposer(composer);
blockComposer.setLineSpace(new Length(.25f, UnitModeEnum.Relative));
composer.beginLocalState();
composer.setFillColor(
new DeviceRGBColor(115f/255,164f/255,232f/255)
);
final Rectangle2D frame = new Rectangle2D.Double(
18,
18,
pageSize.getWidth() * .5,
pageSize.getHeight() * .5
);
blockComposer.begin(frame,AlignmentXEnum.Left,AlignmentYEnum.Top);
composer.setFont(ResourceName_DefaultFont,24);
blockComposer.showText("Page coordinates sample");
Dimension2D breakSize = new Dimension(8,4);
blockComposer.showBreak(breakSize);
composer.setFont(ResourceName_DefaultFont,8);
blockComposer.showText(
"This sample shows the effects of the manipulation of the CTM (Current Transformation Matrix), "
+ "that is the mathematical device which affects the page coordinate system used to place "
+ "graphic contents onto the canvas."
);
blockComposer.showBreak(breakSize);
blockComposer.showText(
"The following steps represent the operations applied to this page's CTM in order to alter it. "
+ "Each step writes the word \"Step\" at the lower-left corner of the current page frame:"
);
blockComposer.showBreak(breakSize);
for(int i = 0; i < steps.length; i++)
{
composer.setFillColor(colors[i]);
blockComposer.showText("Step " + i + ")");
composer.setFillColor(
new DeviceRGBColor(115f/255,164f/255,232f/255)
);
blockComposer.showText(" " + steps[i]);
blockComposer.showBreak(breakSize);
}
blockComposer.showText("Note that the approximation (" + maxCtmInversionApproximation + ") of the CTM components at step 4 is due to floating point precision limits; their exact values should be 1.0, 0.0, 0.0, 1.0, 0.0, 0.0.");