< prev index next >

test/java/awt/Graphics2D/RenderClipTest/RenderClipTest.java

Print this page




  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 /*
  25  * @test
  26  * @bug 6766342
  27  * @summary Tests clipping invariance for AA rectangle and line primitives
  28  * @run main RenderClipTest -strict -readfile 6766342.tests
  29  * @run main RenderClipTest -rectsuite -count 10

  30  */
  31 
  32 import java.awt.*;
  33 import java.awt.geom.*;
  34 import java.awt.image.*;
  35 import java.awt.event.*;
  36 import java.util.Vector;
  37 import java.io.*;
  38 
  39 public class RenderClipTest {
  40     public static double randDblCoord() {
  41         return Math.random()*60 - 10;
  42     }
  43 
  44     public static float randFltCoord() {
  45         return (float) randDblCoord();
  46     }
  47 
  48     public static int randIntCoord() {
  49         return (int) Math.round(randDblCoord());




  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 /*
  25  * @test
  26  * @bug 6766342
  27  * @summary Tests clipping invariance for AA rectangle and line primitives
  28  * @run main RenderClipTest -strict -readfile 6766342.tests
  29  * @run main RenderClipTest -rectsuite -count 10
  30  * @key randomness
  31  */
  32 
  33 import java.awt.*;
  34 import java.awt.geom.*;
  35 import java.awt.image.*;
  36 import java.awt.event.*;
  37 import java.util.Vector;
  38 import java.io.*;
  39 
  40 public class RenderClipTest {
  41     public static double randDblCoord() {
  42         return Math.random()*60 - 10;
  43     }
  44 
  45     public static float randFltCoord() {
  46         return (float) randDblCoord();
  47     }
  48 
  49     public static int randIntCoord() {
  50         return (int) Math.round(randDblCoord());


< prev index next >