use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamHatchsep.
@ParameterizedTest
@MethodSource(value = "cmdUnitProvider")
void testParamHatchsep(final Tuple<String, String> cmd, final String unit) {
parser(cmd.a + "[fillstyle=clines, hatchsep=2.1" + unit + "]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isInteriorStylable());
assertEquals(PSTContext.doubleUnitToUnit(2.1, unit) * Shape.PPC, sh.getHatchingsSep(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamHatchwidth.
@ParameterizedTest
@MethodSource(value = "cmdUnitProvider")
void testParamHatchwidth(final Tuple<String, String> cmd, final String unit) {
parser(cmd.a + "[fillstyle=clines, hatchwidth=23" + unit + "]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isInteriorStylable());
assertEquals(PSTContext.doubleUnitToUnit(23, unit) * Shape.PPC, sh.getHatchingsWidth(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamLinecolorPredefinedColor.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamLinecolorPredefinedColor(final Tuple<String, String> cmd) {
parser(cmd.a + "[linecolor=blue]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isLineStylable());
assertEquals(DviPsColors.BLUE, sh.getLineColour());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamNoShadow.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamNoShadow(final Tuple<String, String> cmd) {
parser(cmd.a + "[shadow = false]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isShadowable());
assertFalse(sh.hasShadow());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamShadowsize.
@ParameterizedTest
@MethodSource(value = "cmdUnitProvider")
void testParamShadowsize(final Tuple<String, String> cmd, final String unit) {
parser(cmd.a + "[shadow=true, shadowsize=5.4" + unit + "]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isShadowable());
assertEquals(PSTContext.doubleUnitToUnit(5.4, unit) * Shape.PPC, sh.getShadowSize(), 0.00001);
}
Aggregations