< prev index next >
modules/graphics/src/test/java/test/com/sun/javafx/test/TransformHelper.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 648,766 ****
return TransformUtils.immutableTransform(
mxx, mxy, 0.0, tx,
myx, myy, 0.0, ty,
0.0, 0.0, 1.0, 0.0);
}
-
- /**
- * Creates a raw transformation to test the Transform class.
- */
- public static Transform rawTransform(
- double mxx, double mxy, double mxz, double tx,
- double myx, double myy, double myz, double ty,
- double mzx, double mzy, double mzz, double tz) {
- return new RawTransform(
- mxx, mxy, mxz, tx,
- myx, myy, myz, ty,
- mzx, mzy, mzz, tz);
- }
-
- private static class RawTransform extends Transform {
- private final double mxx, mxy, mxz, tx;
- private final double myx, myy, myz, ty;
- private final double mzx, mzy, mzz, tz;
-
- public RawTransform(
- double mxx, double mxy, double mxz, double tx,
- double myx, double myy, double myz, double ty,
- double mzx, double mzy, double mzz, double tz) {
- this.mxx = mxx;
- this.mxy = mxy;
- this.mxz = mxz;
- this.tx = tx;
- this.myx = myx;
- this.myy = myy;
- this.myz = myz;
- this.ty = ty;
- this.mzx = mzx;
- this.mzy = mzy;
- this.mzz = mzz;
- this.tz = tz;
- }
-
- @Override
- public double getMxx() {
- return mxx;
- }
-
- @Override
- public double getMxy() {
- return mxy;
- }
-
- @Override
- public double getMxz() {
- return mxz;
- }
-
- @Override
- public double getTx() {
- return tx;
- }
-
- @Override
- public double getMyx() {
- return myx;
- }
-
- @Override
- public double getMyy() {
- return myy;
- }
-
- @Override
- public double getMyz() {
- return myz;
- }
-
- @Override
- public double getTy() {
- return ty;
- }
-
- @Override
- public double getMzx() {
- return mzx;
- }
-
- @Override
- public double getMzy() {
- return mzy;
- }
-
- @Override
- public double getMzz() {
- return mzz;
- }
-
- @Override
- public double getTz() {
- return tz;
- }
-
- @Override
- public void impl_apply(Affine3D t) {
- t.concatenate(
- getMxx(), getMxy(), getMxz(), getTx(),
- getMyx(), getMyy(), getMyz(), getTy(),
- getMzx(), getMzy(), getMzz(), getTz());
- }
-
- @Override
- public BaseTransform impl_derive(BaseTransform t) {
- return t.deriveWithConcatenation(
- getMxx(), getMxy(), getMxz(), getTx(),
- getMyx(), getMyy(), getMyz(), getTy(),
- getMzx(), getMzy(), getMzz(), getTz());
- }
- }
}
--- 648,653 ----
< prev index next >