use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamGradbegin.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamGradbegin(final Tuple<String, String> cmd) {
parser(cmd.a + "[fillstyle=gradient, gradbegin=yellow]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isInteriorStylable());
assertEquals(DviPsColors.YELLOW, sh.getGradColStart());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestParsingShape method testParamShadow.
@ParameterizedTest
@MethodSource(value = "cmds")
void testParamShadow(final Tuple<String, String> cmd) {
parser(cmd.a + "[shadow =true]" + cmd.b);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isShadowable());
assertTrue(sh.hasShadow());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestStarredCommand method testBorderPos.
@ParameterizedTest
@MethodSource("cmds")
void testBorderPos(final String cmd) {
parser(cmd);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isBordersMovable());
assertEquals(BorderPos.INTO, sh.getBordersPosition());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class TestStarredCommand method testLineStyle.
@ParameterizedTest
@MethodSource("cmds")
void testLineStyle(final String cmd) {
parser(cmd);
final Shape sh = getShapeAt(0);
assumeTrue(sh.isLineStylable());
assertEquals(LineStyle.SOLID, sh.getLineStyle());
}
use of net.sf.latexdraw.model.api.shape.Shape in project latexdraw by arnobl.
the class MoveBackForegroundShapes method moveBackground.
/**
* Puts the shapes in the background.
*/
private void moveBackground() {
final int size = shape.size();
prepareMove();
for (int i = size - 1; i >= 0; i--) {
final Shape sh = sortedSh.get(i);
formerId[i] = drawing.getShapes().indexOf(sh);
drawing.removeShape(sh);
drawing.addShape(sh, 0);
}
drawing.setModified(true);
}
Aggregations