6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test 1.2 02/05/15
25 @bug 4810363 4924441
26 @run main DeviceScale
27 @summary check the peek scale is the same as the device scale, and that the
28 clips are also the same
29 */
30 import java.io.*;
31 import java.net.*;
32 import java.awt.*;
33 import java.awt.geom.*;
34 import java.awt.print.*;
35 import javax.print.attribute.*;
36 import javax.print.attribute.standard.*;
37
38 public class DeviceScale implements Printable {
39
40 boolean firstTime = true;
41 double sx, sy;
42 Shape clip, firstClip;
43
44 public int print(Graphics g, PageFormat pf, int pageIndex) {
45 Graphics2D g2 = (Graphics2D)g;
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test 1.2 02/05/15
25 @bug 4810363 4924441
26 @key printer
27 @run main DeviceScale
28 @summary check the peek scale is the same as the device scale, and that the
29 clips are also the same
30 */
31 import java.io.*;
32 import java.net.*;
33 import java.awt.*;
34 import java.awt.geom.*;
35 import java.awt.print.*;
36 import javax.print.attribute.*;
37 import javax.print.attribute.standard.*;
38
39 public class DeviceScale implements Printable {
40
41 boolean firstTime = true;
42 double sx, sy;
43 Shape clip, firstClip;
44
45 public int print(Graphics g, PageFormat pf, int pageIndex) {
46 Graphics2D g2 = (Graphics2D)g;
|