51
52 /**
53 * The height of the physical page in 1/72nds
54 * of an inch. The number is stored as a floating
55 * point value rather than as an integer
56 * to facilitate the conversion from metric
57 * units to 1/72nds of an inch and then back.
58 * (This may or may not be a good enough reason
59 * for a float).
60 */
61 private double mHeight;
62
63 /**
64 * The width of the physical page in 1/72nds
65 * of an inch.
66 */
67 private double mWidth;
68
69 /**
70 * The area of the page on which drawing will
71 * be visable. The area outside of this
72 * rectangle but on the Page generally
73 * reflects the printer's hardware margins.
74 * The origin of the physical page is
75 * at (0, 0) with this rectangle provided
76 * in that coordinate system.
77 */
78 private Rectangle2D mImageableArea;
79
80 /* Constructors */
81
82 /**
83 * Creates a letter sized piece of paper
84 * with one inch margins.
85 */
86 public Paper() {
87 mHeight = LETTER_HEIGHT;
88 mWidth = LETTER_WIDTH;
89 mImageableArea = new Rectangle2D.Double(INCH, INCH,
90 mWidth - 2 * INCH,
91 mHeight - 2 * INCH);
|
51
52 /**
53 * The height of the physical page in 1/72nds
54 * of an inch. The number is stored as a floating
55 * point value rather than as an integer
56 * to facilitate the conversion from metric
57 * units to 1/72nds of an inch and then back.
58 * (This may or may not be a good enough reason
59 * for a float).
60 */
61 private double mHeight;
62
63 /**
64 * The width of the physical page in 1/72nds
65 * of an inch.
66 */
67 private double mWidth;
68
69 /**
70 * The area of the page on which drawing will
71 * be visible. The area outside of this
72 * rectangle but on the Page generally
73 * reflects the printer's hardware margins.
74 * The origin of the physical page is
75 * at (0, 0) with this rectangle provided
76 * in that coordinate system.
77 */
78 private Rectangle2D mImageableArea;
79
80 /* Constructors */
81
82 /**
83 * Creates a letter sized piece of paper
84 * with one inch margins.
85 */
86 public Paper() {
87 mHeight = LETTER_HEIGHT;
88 mWidth = LETTER_WIDTH;
89 mImageableArea = new Rectangle2D.Double(INCH, INCH,
90 mWidth - 2 * INCH,
91 mHeight - 2 * INCH);
|