use of net.sf.latexdraw.models.interfaces.shape.IGrid in project latexdraw by arnobl.
the class TestParsingPsgrid method testSubGridDots.
@Theory
public void testSubGridDots(@TestedOn(ints = { 0, 3 }) final int div) {
parser("\\psgrid[subgriddots=" + div + "](0,0)(0,0)(1,1)");
final IGrid grid = getShapeAt(0);
assertEquals(div, grid.getSubGridDots());
}
use of net.sf.latexdraw.models.interfaces.shape.IGrid in project latexdraw by arnobl.
the class TestParsingPsgrid method testGridLabelColor.
@Test
public void testGridLabelColor() {
parser("\\psgrid[gridlabelcolor=green](0,0)(0,0)(1,1)");
final IGrid grid = getShapeAt(0);
assertEquals(DviPsColors.GREEN, grid.getGridLabelsColour());
}
use of net.sf.latexdraw.models.interfaces.shape.IGrid in project latexdraw by arnobl.
the class TestParsingPsgrid method testGridYUnitin.
@Test
public void testGridYUnitin() {
parser("\\psgrid[yunit=20in](0,0)(0,0)(1,1)");
final IGrid grid = getShapeAt(0);
assertEquals(1d, grid.getUnit(), 0.00001);
}
use of net.sf.latexdraw.models.interfaces.shape.IGrid in project latexdraw by arnobl.
the class TestParsingPsgrid method testGridLabels.
@Test
public void testGridLabels() {
parser("\\psgrid[gridlabels=0.3](0,0)(0,0)(1,1)");
final IGrid grid = getShapeAt(0);
assertEquals((int) (0.3 * IShape.PPC), grid.getLabelsSize());
}
use of net.sf.latexdraw.models.interfaces.shape.IGrid in project latexdraw by arnobl.
the class TestParsingPsgrid method testGridXUnit.
@Test
public void testGridXUnit() {
parser("\\psgrid[xunit=0.3](0,0)(0,0)(1,1)");
final IGrid grid = getShapeAt(0);
assertEquals(1d, grid.getUnit(), 0.00001);
}
Aggregations