Package plotter

Examples of plotter.LineChecker


  }


  public void testPaintSimple() throws InterruptedException, InvocationTargetException {
    CountingGraphics g = paint();
    LineChecker c = new LineChecker();
    c.require(199, 0, 199, 200);
    c.require(149, 0, 149, 200);
    c.require(99, 0, 99, 200);
    c.require(49, 0, 49, 200);
    c.require(0, 150, 200, 150);
    c.require(0, 100, 200, 100);
    c.require(0, 50, 200, 50);
    c.require(0, 0, 200, 0);
    c.check(g.getLines());
  }
View Full Code Here


  }


  public void testPaintClip() throws InterruptedException, InvocationTargetException {
    CountingGraphics g = paint(new Rectangle(25, 25, 50, 2));
    LineChecker c = new LineChecker();
    c.require(49, 24, 49, 27);
    c.check(g.getLines());
  }
View Full Code Here


  public void testPaintClipCustomStroke() throws InterruptedException, InvocationTargetException {
    grid.setStroke(new BasicStroke(1, 0, 0, 1, new float[] { 5, 5 }, 0));
    CountingGraphics g = paint(new Rectangle(25, 25, 50, 2));
    LineChecker c = new LineChecker();
    c.require(49, 20, 49, 27);
    c.check(g.getLines());
  }
View Full Code Here

      public Shape createStrokedShape(Shape p) {
        return s.createStrokedShape(p);
      }
    });
    CountingGraphics g = paint(new Rectangle(25, 25, 50, 2));
    LineChecker c = new LineChecker();
    c.require(49, 0, 49, 199);
    c.check(g.getLines());
  }
View Full Code Here

    add(.1, .1);
    add(.9, .9);
    CountingGraphics g = paint();
    assertEquals(2, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(19, 180, 179, 20);
    c.check(g.getLines());
  }
View Full Code Here

    add(.1, .1);
    add(.9, .9);
    CountingGraphics g = paint();
    assertEquals(2, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(179, 180, 19, 20);
    c.check(g.getLines());
  }
View Full Code Here

    add(.1, .1);
    add(.9, .9);
    CountingGraphics g = paint();
    assertEquals(2, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(19, 180, 179, 20);
    c.check(g.getLines());
  }
View Full Code Here

    add(.9, .9);
    add(.95, Double.NaN);
    CountingGraphics g = paint();
    assertEquals(2, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(19, 180, 179, 20);
    c.check(g.getLines());
  }
View Full Code Here

    add(.8, .8);
    add(.9, .9);
    CountingGraphics g = paint();
    assertEquals(4, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(19, 180, 39, 160);
    c.require(159, 40, 179, 20);
    c.check(g.getLines());
  }
View Full Code Here

    add(.1, .1);
    add(.9, .9);
    CountingGraphics g = paint();
    assertEquals(3, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(19, 180, 19, 20);
    c.require(19, 20, 179, 20);
    c.check(g.getLines());
  }
View Full Code Here

TOP

Related Classes of plotter.LineChecker

Copyright © 2018 www.massapicom. 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.