1 /*
2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
248 TransformHelper.immutableTransform(0, 3, 0, 0, 0, 0);
249 private static final Transform immutable_nonInv_shear_y =
250 TransformHelper.immutableTransform(0, 0, 0, 3, 0, 0);
251 private static final Transform immutable_nonInv_sh_tr_x =
252 TransformHelper.immutableTransform(0, 3, 4, 0, 0, 0);
253 private static final Transform immutable_nonInv_sh_tr_y =
254 TransformHelper.immutableTransform(0, 0, 0, 3, 0, 4);
255 private static final Transform immutable_nonInv_sh_sc_tr =
256 TransformHelper.immutableTransform(0, 0, 0, 2, 3, 4);
257 private static final Transform immutable_nonInv_sh_sc =
258 TransformHelper.immutableTransform(0, 0, 0, 2, 3, 0);
259 private static final Transform immutable_nonInv_sh_tr =
260 TransformHelper.immutableTransform(0, 0, 0, 2, 0, 5);
261 private static final Transform immutable_nonInv_sc_tr =
262 TransformHelper.immutableTransform(0, 0, 0, 0, 6, 5);
263 private static final Transform immutable_nonInv_sc_tr_x =
264 TransformHelper.immutableTransform(2, 0, 4, 0, 0, 0);
265 private static final Transform immutable_nonInv_sc_tr_y =
266 TransformHelper.immutableTransform(0, 0, 0, 0, 2, 7);
267 private static final Transform raw_arbitrary_nonInvertible =
268 TransformHelper.rawTransform( 5, 6, 7, 8,
269 10, 11, 12, 13,
270 15, 16, 17, 18);
271 private static final Transform raw_arbitrary =
272 TransformHelper.rawTransform( 5, 6, 13, 8,
273 10, 4, 12, 13,
274 15, 16, 26, 18);
275 private static final Transform raw_empty =
276 TransformHelper.rawTransform(0, 0, 0, 0,
277 0, 0, 0, 0,
278 0, 0, 0, 0);
279 private static final Transform raw_emptyZ =
280 TransformHelper.rawTransform(1, 0, 0, 0,
281 0, 1, 0, 0,
282 0, 0, 0, 0);
283 private static final Transform raw_emptyXY =
284 TransformHelper.rawTransform(0, 0, 0, 0,
285 0, 0, 0, 0,
286 0, 0, 1, 0);
287
288 private boolean listenerCalled;
289 private int eventCounter;
290
291 //BEWARE: used also in AffineOperationsTest
292 @Parameters
293 public static Collection getParams() {
294 return Arrays.asList(new Object[][] {
295 { affine_identity, true, Affine.class }, // 0
296 { affine_translate, true, Affine.class }, // 1
297 { affine_translate_only, true, Affine.class }, // 2
298 { affine_scale, true, Affine.class }, // 3
299 { affine_sc_tr, true, Affine.class }, // 4
300 { affine_shear, true, Affine.class }, // 5
301 { affine_sh_tr, true, Affine.class }, // 6
302 { affine_sh_sc_simple, true, Affine.class }, // 7
303 { affine_sh_sc, true, Affine.class }, // 8
304 { affine_sh_sc_tr, true, Affine.class }, // 9
|
1 /*
2 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
248 TransformHelper.immutableTransform(0, 3, 0, 0, 0, 0);
249 private static final Transform immutable_nonInv_shear_y =
250 TransformHelper.immutableTransform(0, 0, 0, 3, 0, 0);
251 private static final Transform immutable_nonInv_sh_tr_x =
252 TransformHelper.immutableTransform(0, 3, 4, 0, 0, 0);
253 private static final Transform immutable_nonInv_sh_tr_y =
254 TransformHelper.immutableTransform(0, 0, 0, 3, 0, 4);
255 private static final Transform immutable_nonInv_sh_sc_tr =
256 TransformHelper.immutableTransform(0, 0, 0, 2, 3, 4);
257 private static final Transform immutable_nonInv_sh_sc =
258 TransformHelper.immutableTransform(0, 0, 0, 2, 3, 0);
259 private static final Transform immutable_nonInv_sh_tr =
260 TransformHelper.immutableTransform(0, 0, 0, 2, 0, 5);
261 private static final Transform immutable_nonInv_sc_tr =
262 TransformHelper.immutableTransform(0, 0, 0, 0, 6, 5);
263 private static final Transform immutable_nonInv_sc_tr_x =
264 TransformHelper.immutableTransform(2, 0, 4, 0, 0, 0);
265 private static final Transform immutable_nonInv_sc_tr_y =
266 TransformHelper.immutableTransform(0, 0, 0, 0, 2, 7);
267 private static final Transform raw_arbitrary_nonInvertible =
268 TransformShim.createRawTransform(5, 6, 7, 8,
269 10, 11, 12, 13,
270 15, 16, 17, 18);
271 private static final Transform raw_arbitrary =
272 TransformShim.createRawTransform(5, 6, 13, 8,
273 10, 4, 12, 13,
274 15, 16, 26, 18);
275 private static final Transform raw_empty =
276 TransformShim.createRawTransform(0, 0, 0, 0,
277 0, 0, 0, 0,
278 0, 0, 0, 0);
279 private static final Transform raw_emptyZ =
280 TransformShim.createRawTransform(1, 0, 0, 0,
281 0, 1, 0, 0,
282 0, 0, 0, 0);
283 private static final Transform raw_emptyXY =
284 TransformShim.createRawTransform(0, 0, 0, 0,
285 0, 0, 0, 0,
286 0, 0, 1, 0);
287
288 private boolean listenerCalled;
289 private int eventCounter;
290
291 //BEWARE: used also in AffineOperationsTest
292 @Parameters
293 public static Collection getParams() {
294 return Arrays.asList(new Object[][] {
295 { affine_identity, true, Affine.class }, // 0
296 { affine_translate, true, Affine.class }, // 1
297 { affine_translate_only, true, Affine.class }, // 2
298 { affine_scale, true, Affine.class }, // 3
299 { affine_sc_tr, true, Affine.class }, // 4
300 { affine_shear, true, Affine.class }, // 5
301 { affine_sh_tr, true, Affine.class }, // 6
302 { affine_sh_sc_simple, true, Affine.class }, // 7
303 { affine_sh_sc, true, Affine.class }, // 8
304 { affine_sh_sc_tr, true, Affine.class }, // 9
|