modules/graphics/src/test/java/javafx/scene/transform/AffineTest.java

Print this page
rev 6167 : RT-35330 [Monocle] Remove StubToolkit and replace it with headless glass implementation


   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
  23  * questions.
  24  */
  25 
  26 package javafx.scene.transform;
  27 

  28 import javafx.beans.Observable;
  29 import static javafx.scene.transform.TransformTest.assertTx;
  30 import javafx.scene.shape.Rectangle;
  31 
  32 import org.junit.Assert;

  33 import org.junit.Test;
  34 import static org.junit.Assert.*;
  35 
  36 import com.sun.javafx.test.TransformHelper;
  37 import com.sun.javafx.geom.transform.Affine2D;
  38 import com.sun.javafx.geom.transform.Affine3D;
  39 import com.sun.javafx.scene.transform.TransformUtils;
  40 import javafx.geometry.Point3D;
  41 import javafx.beans.InvalidationListener;
  42 
  43 public class AffineTest {
  44 



  45     private static final double[] array2d = new double[] {
  46          0, 1,
  47          2,  3,  4,
  48          6,  7,  8,
  49          0,  0,  1 };
  50 
  51     private static final double[] array3d = new double[] {
  52          0, 1,
  53          2,  3,  4,  5,
  54          6,  7,  8,  9,
  55         10, 11, 12, 13,
  56          0,  0,  0,  1 };
  57 
  58     private static final double[] arrayZeros = new double[] {
  59          0, 0, 0, 0, 
  60          0, 0, 0, 0,
  61          0, 0, 0, 0,
  62          0, 0, 0, 0, 1, 0, 0, 0, 0 };
  63 
  64     @Test




   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
  23  * questions.
  24  */
  25 
  26 package javafx.scene.transform;
  27 
  28 import com.sun.javafx.FXUnit;
  29 import javafx.beans.Observable;
  30 import static javafx.scene.transform.TransformTest.assertTx;
  31 import javafx.scene.shape.Rectangle;
  32 
  33 import org.junit.Assert;
  34 import org.junit.Rule;
  35 import org.junit.Test;
  36 import static org.junit.Assert.*;
  37 
  38 import com.sun.javafx.test.TransformHelper;
  39 import com.sun.javafx.geom.transform.Affine2D;
  40 import com.sun.javafx.geom.transform.Affine3D;
  41 import com.sun.javafx.scene.transform.TransformUtils;
  42 import javafx.geometry.Point3D;
  43 import javafx.beans.InvalidationListener;
  44 
  45 public class AffineTest {
  46 
  47     @Rule
  48     public FXUnit fx = new FXUnit();
  49 
  50     private static final double[] array2d = new double[] {
  51          0, 1,
  52          2,  3,  4,
  53          6,  7,  8,
  54          0,  0,  1 };
  55 
  56     private static final double[] array3d = new double[] {
  57          0, 1,
  58          2,  3,  4,  5,
  59          6,  7,  8,  9,
  60         10, 11, 12, 13,
  61          0,  0,  0,  1 };
  62 
  63     private static final double[] arrayZeros = new double[] {
  64          0, 0, 0, 0, 
  65          0, 0, 0, 0,
  66          0, 0, 0, 0,
  67          0, 0, 0, 0, 1, 0, 0, 0, 0 };
  68 
  69     @Test