Package plotter

Examples of plotter.CountingGraphics


    prepend(.4, .4);
    prepend(.5, .5);
    prepend(.6, .6);
    line.removeFirst(1);
    line.add(.1, .1);
    CountingGraphics g = paint(new Rectangle(24, 176, 10, 10));

    LineChecker c = new LineChecker();
    c.require(19, 180, 39, 160);
    c.allow(39, 160, 59, 140);
    c.allow(59, 140, 79, 120);
    c.check(g.getLines());
    assertEquals(g.getLines().size() + 1, g.getPointCount());
  }
View Full Code Here


    prepend(.4, .4);
    prepend(.5, .5);
    prepend(.6, .6);
    line.removeFirst(1);
    line.add(.1, .1);
    CountingGraphics g = paint(new Rectangle(44, 156, 10, 10));

    LineChecker c = new LineChecker();
    c.allow(19, 180, 39, 160);
    c.require(39, 160, 59, 140);
    c.allow(59, 140, 79, 120);
    c.check(g.getLines());
    assertEquals(g.getLines().size() + 1, g.getPointCount());
  }
View Full Code Here

    prepend(.5, .5);
    prepend(.6, .6);
    prepend(.7, .7);
    line.removeFirst(1);
    line.add(.1, .1);
    CountingGraphics g = paint(new Rectangle(24, 176, 10, 10));

    LineChecker c = new LineChecker();
    c.require(19, 180, 39, 160);
    c.allow(39, 160, 59, 140);
    c.allow(59, 140, 79, 120);
    c.check(g.getLines());
    assertEquals(g.getLines().size() + 1, g.getPointCount());
  }
View Full Code Here

    prepend(.5, .5);
    prepend(.6, .6);
    prepend(.7, .7);
    line.removeFirst(1);
    line.add(.1, .1);
    CountingGraphics g = paint(new Rectangle(44, 156, 10, 10));

    LineChecker c = new LineChecker();
    c.allow(19, 180, 39, 160);
    c.require(39, 160, 59, 140);
    c.allow(59, 140, 79, 120);
    c.check(g.getLines());
    assertEquals(g.getLines().size() + 1, g.getPointCount());
  }
View Full Code Here

  public void testPointOutline() throws InterruptedException, InvocationTargetException {
    line.setPointOutline(createSquare());
    add(.1, .1);
    add(.9, .9);
    CountingGraphics g = paint();
    assertEquals(12, g.getPointCount());
    assertEquals(2, g.getShapeCount());

    LineChecker c = new LineChecker();
    c.require(19, 180, 179, 20);

    // Point 1
    c.require(14, 175, 14, 185);
    c.require(14, 185, 24, 185);
    c.require(24, 185, 24, 175);
    c.require(24, 175, 14, 175);

    // Point 2
    c.require(174, 15, 174, 25);
    c.require(174, 25, 184, 25);
    c.require(184, 25, 184, 15);
    c.require(184, 15, 174, 15);

    c.check(g.getLines());
  }
View Full Code Here

  public void testPointOutlineNaN() throws InterruptedException, InvocationTargetException {
    line.setPointOutline(createSquare());
    add(.1, .1);
    add(.5, Double.NaN);
    add(.9, .9);
    CountingGraphics g = paint();
    assertEquals(10, g.getPointCount());
    assertEquals(2, g.getShapeCount());

    LineChecker c = new LineChecker();

    // Point 1
    c.require(14, 175, 14, 185);
    c.require(14, 185, 24, 185);
    c.require(24, 185, 24, 175);
    c.require(24, 175, 14, 175);

    // Point 3
    c.require(174, 15, 174, 25);
    c.require(174, 25, 184, 25);
    c.require(184, 25, 184, 15);
    c.require(184, 15, 174, 15);

    c.check(g.getLines());
  }
View Full Code Here


  public void testPaintSimple() throws InterruptedException, InvocationTargetException {
    setupX();
    line.setValue(.5);
    CountingGraphics g = paint();
    assertEquals(2, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(99, 0, 99, 200);
    c.check(g.getLines());
  }
View Full Code Here


  public void testPaintSimpleY() throws InterruptedException, InvocationTargetException {
    setupY();
    line.setValue(.5);
    CountingGraphics g = paint();
    assertEquals(2, g.getPointCount());

    LineChecker c = new LineChecker();
    c.require(0, 100, 200, 100);
    c.check(g.getLines());
  }
View Full Code Here


  public void testPaintClip() throws InterruptedException, InvocationTargetException {
    setupX();
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(150, 0, 50, 200));
    assertEquals(0, g.getPointCount());
  }
View Full Code Here


  public void testPaintClipY() throws InterruptedException, InvocationTargetException {
    setupY();
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(0, 200, 150, 50));
    assertEquals(0, g.getPointCount());
  }
View Full Code Here

TOP

Related Classes of plotter.CountingGraphics

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.