use of net.sf.latexdraw.parser.svg.path.SVGPathSegMoveto in project latexdraw by arnobl.
the class TestSVGPathSegCurvetoCubicSmooth method testToString.
@Test
public void testToString() {
final AtomicBoolean done = new AtomicBoolean(false);
final SVGPathSegMoveto m = new SVGPathSegMoveto(0d, 0d, false);
SVGParserUtils.INSTANCE.parseSVGPath(m.toString() + " " + seg.toString(), pathSeg -> {
if (pathSeg instanceof SVGPathSegMoveto) {
return;
}
done.set(true);
final SVGPathSegCurvetoCubicSmooth seg2 = (SVGPathSegCurvetoCubicSmooth) pathSeg;
assertEquals(seg.getX(), seg2.getX(), 0.0001);
assertEquals(seg.getY(), seg2.getY(), 0.0001);
assertEquals(seg.isRelative(), seg2.isRelative());
});
assertTrue(done.get());
}
use of net.sf.latexdraw.parser.svg.path.SVGPathSegMoveto in project latexdraw by arnobl.
the class TestSVGPathSegLinetoHorizontal method testToString.
@Test
void testToString() {
final AtomicBoolean done = new AtomicBoolean(false);
final SVGPathSegMoveto m = new SVGPathSegMoveto(0d, 0d, false);
SVGParserUtils.INSTANCE.parseSVGPath(m.toString() + " " + seg.toString(), pathSeg -> {
if (pathSeg instanceof SVGPathSegMoveto) {
return;
}
done.set(true);
final SVGPathSegLinetoHorizontal seg2 = (SVGPathSegLinetoHorizontal) pathSeg;
assertEquals(seg.getX(), seg2.getX(), 0.0001);
assertEquals(seg.isRelative(), seg2.isRelative());
});
assertTrue(done.get());
}
use of net.sf.latexdraw.parser.svg.path.SVGPathSegMoveto in project latexdraw by arnobl.
the class TestSVGPathSegLineto method testToString.
@Test
void testToString() {
final AtomicBoolean done = new AtomicBoolean(false);
final SVGPathSegMoveto m = new SVGPathSegMoveto(0d, 0d, false);
SVGParserUtils.INSTANCE.parseSVGPath(m.toString() + " " + seg.toString(), pathSeg -> {
if (pathSeg instanceof SVGPathSegMoveto) {
return;
}
done.set(true);
final SVGPathSegLineto seg2 = (SVGPathSegLineto) pathSeg;
assertEquals(seg.getX(), seg2.getX(), 0.0001);
assertEquals(seg.getY(), seg2.getY(), 0.0001);
assertEquals(seg.isRelative(), seg2.isRelative());
});
assertTrue(done.get());
}
Aggregations