use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamDoublecolorPredefined.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamDoublecolorPredefined(final Tuple<String, String> cmd) {
parser(cmd.a + "[doubleline=true, doublecolor=red]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isDbleBorderable());
assertEquals(DviPsColors.RED, sh.getDbleBordCol());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamLinewidth.
@ParameterizedTest
@MethodSource(value = "cmdUnitProvider")
void testParamLinewidth(final Tuple<String, String> cmd, final String unit) {
parser(cmd.a + "[linewidth=2" + unit + "]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isThicknessable());
assertEquals(PSTContext.doubleUnitToUnit(2, unit) * Shape.PPC, sh.getThickness(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamFillingcolorPredefined.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamFillingcolorPredefined(final Tuple<String, String> cmd) {
parser(cmd.a + "[fillstyle=solid, fillcolor=green]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isFillable());
assertEquals(DviPsColors.GREEN, sh.getFillingCol());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamShadowangle.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamShadowangle(final Tuple<String, String> cmd) {
parser(cmd.a + "[shadow=true, shadowangle=-23.1]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isShadowable());
assertEquals(Math.toRadians(-23.1), sh.getShadowAngle(), 0.00001);
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamHatchcolor.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamHatchcolor(final Tuple<String, String> cmd) {
parser(cmd.a + "[fillstyle=clines, hatchcolor=blue]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isInteriorStylable());
assertEquals(DviPsColors.BLUE, sh.getHatchingsCol());
}
Aggregations