Package plotter

Examples of plotter.LineChecker


    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 testPaintClipPartial() throws InterruptedException, InvocationTargetException {
    setupX();
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(0, 49, 200, 100));
    LineChecker c = new LineChecker();
    c.require(99, 48, 99, 149);
    c.check(g.getLines());
  }
View Full Code Here

  public void testPaintClipPartialY() throws InterruptedException, InvocationTargetException {
    setupY();
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(49, 0, 100, 200));
    LineChecker c = new LineChecker();
    c.require(48, 100, 149, 100);
    c.check(g.getLines());
  }
View Full Code Here

  public void testPaintClipPartialCustomStroke() throws InterruptedException, InvocationTargetException {
    setupX();
    line.setStroke(new BasicStroke(1, 0, 0, 1, new float[] { 5, 5 }, 0));
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(0, 49, 200, 100));
    LineChecker c = new LineChecker();
    c.require(99, 40, 99, 149);
    c.check(g.getLines());
  }
View Full Code Here

  public void testPaintClipPartialCustomStrokeY() throws InterruptedException, InvocationTargetException {
    setupY();
    line.setStroke(new BasicStroke(1, 0, 0, 1, new float[] { 5, 5 }, 0));
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(49, 0, 100, 200));
    LineChecker c = new LineChecker();
    c.require(40, 100, 149, 100);
    c.check(g.getLines());
  }
View Full Code Here

        return s.createStrokedShape(p);
      }
    });
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(0, 49, 200, 100));
    LineChecker c = new LineChecker();
    c.require(99, 0, 99, 200);
    c.check(g.getLines());
  }
View Full Code Here

        return s.createStrokedShape(p);
      }
    });
    line.setValue(.5);
    CountingGraphics g = paint(new Rectangle(49, 0, 100, 200));
    LineChecker c = new LineChecker();
    c.require(0, 100, 200, 100);
    c.check(g.getLines());
  }
View Full Code Here

    assertEquals(.8, listener.endY, .01);

    CountingGraphics g = new CountingGraphics(new BufferedImage(1000, 1000, BufferedImage.TYPE_3BYTE_BGR)
        .createGraphics());
    slopeLine.paintComponent(g);
    LineChecker lines = new LineChecker();
    lines.require(0, 50, 1000, 550);
    lines.check(g.getLines());

    MouseEvent release = new MouseEvent(contents, MouseEvent.MOUSE_RELEASED, System.currentTimeMillis(), 0, x3, y3,
        xAbs3, yAbs3, 1, false, MouseEvent.BUTTON1);
    slopeLine.mouseReleased(release);
    assertEquals(1, listener.addCount);
View Full Code Here

    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(.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

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.