Package java.awt.geom

Examples of java.awt.geom.Rectangle2D.outcode()


    harness.check(r.outcode(5.0, 5.0) == 0);
    harness.check(r.outcode(0.0, 0.0) == 0);
    harness.check(r.outcode(0.0, 10.0) == 0);
    harness.check(r.outcode(10.0, 0.0) == 0);
    harness.check(r.outcode(10.0, 10.0) == 0);
    harness.check(r.outcode(-5.0, 5.0) == Rectangle2D.OUT_LEFT);   
    harness.check(r.outcode(15.0, 5.0) == Rectangle2D.OUT_RIGHT);   
    harness.check(r.outcode(5.0, -5.0) == Rectangle2D.OUT_TOP);   
    harness.check(r.outcode(5.0, 15.0) == Rectangle2D.OUT_BOTTOM);   
    harness.check(r.outcode(-5.0, -5.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_TOP));   
View Full Code Here


    harness.check(r.outcode(0.0, 0.0) == 0);
    harness.check(r.outcode(0.0, 10.0) == 0);
    harness.check(r.outcode(10.0, 0.0) == 0);
    harness.check(r.outcode(10.0, 10.0) == 0);
    harness.check(r.outcode(-5.0, 5.0) == Rectangle2D.OUT_LEFT);   
    harness.check(r.outcode(15.0, 5.0) == Rectangle2D.OUT_RIGHT);   
    harness.check(r.outcode(5.0, -5.0) == Rectangle2D.OUT_TOP);   
    harness.check(r.outcode(5.0, 15.0) == Rectangle2D.OUT_BOTTOM);   
    harness.check(r.outcode(-5.0, -5.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, -5.0) == (Rectangle2D.OUT_RIGHT
View Full Code Here

    harness.check(r.outcode(0.0, 10.0) == 0);
    harness.check(r.outcode(10.0, 0.0) == 0);
    harness.check(r.outcode(10.0, 10.0) == 0);
    harness.check(r.outcode(-5.0, 5.0) == Rectangle2D.OUT_LEFT);   
    harness.check(r.outcode(15.0, 5.0) == Rectangle2D.OUT_RIGHT);   
    harness.check(r.outcode(5.0, -5.0) == Rectangle2D.OUT_TOP);   
    harness.check(r.outcode(5.0, 15.0) == Rectangle2D.OUT_BOTTOM);   
    harness.check(r.outcode(-5.0, -5.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, -5.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_TOP));   
View Full Code Here

    harness.check(r.outcode(10.0, 0.0) == 0);
    harness.check(r.outcode(10.0, 10.0) == 0);
    harness.check(r.outcode(-5.0, 5.0) == Rectangle2D.OUT_LEFT);   
    harness.check(r.outcode(15.0, 5.0) == Rectangle2D.OUT_RIGHT);   
    harness.check(r.outcode(5.0, -5.0) == Rectangle2D.OUT_TOP);   
    harness.check(r.outcode(5.0, 15.0) == Rectangle2D.OUT_BOTTOM);   
    harness.check(r.outcode(-5.0, -5.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, -5.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, 15.0) == (Rectangle2D.OUT_RIGHT
View Full Code Here

    harness.check(r.outcode(10.0, 10.0) == 0);
    harness.check(r.outcode(-5.0, 5.0) == Rectangle2D.OUT_LEFT);   
    harness.check(r.outcode(15.0, 5.0) == Rectangle2D.OUT_RIGHT);   
    harness.check(r.outcode(5.0, -5.0) == Rectangle2D.OUT_TOP);   
    harness.check(r.outcode(5.0, 15.0) == Rectangle2D.OUT_BOTTOM);   
    harness.check(r.outcode(-5.0, -5.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, -5.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, 15.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_BOTTOM));   
View Full Code Here

    harness.check(r.outcode(15.0, 5.0) == Rectangle2D.OUT_RIGHT);   
    harness.check(r.outcode(5.0, -5.0) == Rectangle2D.OUT_TOP);   
    harness.check(r.outcode(5.0, 15.0) == Rectangle2D.OUT_BOTTOM);   
    harness.check(r.outcode(-5.0, -5.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, -5.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, 15.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_BOTTOM));   
    harness.check(r.outcode(-5.0, 15.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_BOTTOM));  
View Full Code Here

    harness.check(r.outcode(5.0, 15.0) == Rectangle2D.OUT_BOTTOM);   
    harness.check(r.outcode(-5.0, -5.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, -5.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, 15.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_BOTTOM));   
    harness.check(r.outcode(-5.0, 15.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_BOTTOM));  
    // check an empty rectangle - all points should be outside
View Full Code Here

            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, -5.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_TOP));   
    harness.check(r.outcode(15.0, 15.0) == (Rectangle2D.OUT_RIGHT
            | Rectangle2D.OUT_BOTTOM));   
    harness.check(r.outcode(-5.0, 15.0) == (Rectangle2D.OUT_LEFT
            | Rectangle2D.OUT_BOTTOM));  
    // check an empty rectangle - all points should be outside
    r = new Rectangle2D.Float(0.0f, 0.0f, 0.0f, 0.0f);
    int outside = Rectangle2D.OUT_LEFT | Rectangle2D.OUT_RIGHT
View Full Code Here

    // check an empty rectangle - all points should be outside
    r = new Rectangle2D.Float(0.0f, 0.0f, 0.0f, 0.0f);
    int outside = Rectangle2D.OUT_LEFT | Rectangle2D.OUT_RIGHT
      | Rectangle2D.OUT_TOP | Rectangle2D.OUT_BOTTOM;
    harness.check(r.outcode(-1.0, -1.0) == outside);
    harness.check(r.outcode(-1.0, 0.0) == outside);
    harness.check(r.outcode(-1.0, 1.0) == outside);
    harness.check(r.outcode(0.0, -1.0) == outside);
    harness.check(r.outcode(0.0, 0.0) == outside);
    harness.check(r.outcode(0.0, 1.0) == outside);
View Full Code Here

    // check an empty rectangle - all points should be outside
    r = new Rectangle2D.Float(0.0f, 0.0f, 0.0f, 0.0f);
    int outside = Rectangle2D.OUT_LEFT | Rectangle2D.OUT_RIGHT
      | Rectangle2D.OUT_TOP | Rectangle2D.OUT_BOTTOM;
    harness.check(r.outcode(-1.0, -1.0) == outside);
    harness.check(r.outcode(-1.0, 0.0) == outside);
    harness.check(r.outcode(-1.0, 1.0) == outside);
    harness.check(r.outcode(0.0, -1.0) == outside);
    harness.check(r.outcode(0.0, 0.0) == outside);
    harness.check(r.outcode(0.0, 1.0) == outside);
    harness.check(r.outcode(1.0, -1.0) == outside);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.