use of net.sf.latexdraw.models.interfaces.shape.IAxes in project latexdraw by arnobl.
the class TestParsingPsaxes method testParse3Coord.
@Test
public void testParse3Coord() {
parser("\\psaxes(0,0)(0,0)(3,4)");
final IAxes axes = getShapeAt(0);
assertEquals(0d, axes.getOriginX(), 0.0001);
assertEquals(0d, axes.getOriginY(), 0.0001);
assertEquals(0d, axes.getGridStartX(), 0.0001);
assertEquals(0d, axes.getGridStartY(), 0.0001);
assertEquals(3d, axes.getGridEndX(), 0.0001);
assertEquals(4d, axes.getGridEndY(), 0.0001);
}
use of net.sf.latexdraw.models.interfaces.shape.IAxes in project latexdraw by arnobl.
the class TestParsingPsaxes method testParamDY.
@Theory
public void testParamDY(@DoubleData(vals = { 2d, 3.5 }) final double dy) {
parser("\\psaxes[Dy=" + dy + "](0,0)(0,0)(2,2)");
final IAxes axes = getShapeAt(0);
assertEquals(dy, axes.getIncrementY(), 0.00001);
}
use of net.sf.latexdraw.models.interfaces.shape.IAxes in project latexdraw by arnobl.
the class TestParsingPsaxes method testParse1Coord.
@Test
public void testParse1Coord() {
parser("\\psaxes(1,2)");
final IAxes axes = getShapeAt(0);
assertEquals(0d, axes.getOriginX(), 0.0001);
assertEquals(0d, axes.getOriginY(), 0.0001);
assertEquals(0d, axes.getGridMinX(), 0.0001);
assertEquals(0d, axes.getGridMinY(), 0.0001);
assertEquals(1d, axes.getGridMaxX(), 0.0001);
assertEquals(2d, axes.getGridMaxY(), 0.0001);
}
use of net.sf.latexdraw.models.interfaces.shape.IAxes in project latexdraw by arnobl.
the class TestIGroup method init4setAxes.
private void init4setAxes() {
IShape sh1 = ShapeFactory.INST.createRectangle();
IAxes sh2 = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint());
IShape sh1b = ShapeFactory.INST.createRectangle();
IAxes sh3 = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint());
shape.getShapes().add(sh1);
shape.getShapes().add(sh2);
shape.getShapes().add(sh1b);
shape.getShapes().add(sh3);
}
use of net.sf.latexdraw.models.interfaces.shape.IAxes in project latexdraw by arnobl.
the class TestIGroup method init4setFill.
private void init4setFill() {
IAxes sh2 = ShapeFactory.INST.createAxes(ShapeFactory.INST.createPoint());
IShape sh1 = ShapeFactory.INST.createRectangle();
IShape sh1b = ShapeFactory.INST.createRectangle();
shape.getShapes().add(sh2);
shape.getShapes().add(sh1);
shape.getShapes().add(sh1b);
}
Aggregations