use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamNoDoubleLine.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamNoDoubleLine(final Tuple<String, String> cmd) {
parser(cmd.a + "[doubleline = false]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isDbleBorderable());
assertFalse(sh.hasDbleBord());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamDoubleLine.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamDoubleLine(final Tuple<String, String> cmd) {
parser(cmd.a + "[doubleline = true]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isDbleBorderable());
assertTrue(sh.hasDbleBord());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamGradmidpoint.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamGradmidpoint(final Tuple<String, String> cmd) {
parser(cmd.a + "[fillstyle=gradient, gradmidpoint=0.2]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isInteriorStylable());
assertEquals(0.2, sh.getGradMidPt(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testOpacity.
@ParameterizedTest
@MethodSource(value = "cmds")
void testOpacity(final Tuple<String, String> cmd) {
parser(cmd.a + "[fillstyle = solid, opacity =0.5]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isFillable());
assertEquals(0.5, sh.getFillingCol().getO(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamshadowcolorPredefinedColor.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamshadowcolorPredefinedColor(final Tuple<String, String> cmd) {
parser(cmd.a + "[shadow=true, shadowcolor=blue]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isShadowable());
assertEquals(DviPsColors.BLUE, sh.getShadowCol());
}
Aggregations