Adobe FLEX 2-PROGRAMMING ACTIONSCRIPT 3.0 Manual page 494

Programming actionscript 3.0
Table of Contents

Advertisement

Comparing points and pixels
A rectangle's width and height are pixel values. A printer uses points as print units of
measurement. Points are a fixed physical size (1/72 inch), but the size of a pixel on the screen
depends on the resolution of the particular screen. The conversion rate between pixels and
points depends on the printer settings and whether the sprite is scaled. An unscaled sprite that
is 72 pixels wide will print out one inch wide, with one point equal to one pixel, independent
of screen resolution.
You can use the following equivalencies to convert inches or centimeters to twips or points (a
twip is 1/20 of a point):
1 point = 1/72 inch = 20 twips
1 inch = 72 points = 1440 twips
1 centimeter = 567 twips
If you omit the
printArea
printed.
Scaling
If you want to scale a Sprite object before you print it, set the scale properties (see the
flash.display.DisplayObject class in the ActionScript 3.0 Language Reference) before calling the
PrintJob.addPage()
scale of a Sprite object has no relation to the
specify a print area that is 50 pixels by 50 pixels, 2500 pixels are printed. If you scale the Sprite
object, the same 2500 pixels are printed, but the Sprite object is printed at the scaled size.
For an example, see
"Example: Scaling, cropping, and responding" on page
494
Printing
parameter, or if it is passed incorrectly, the full area of the sprite is
method, and set them back to their original values after printing. The
property. In other words, if you
printArea
498.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex

Table of Contents