Search in sources :

Example 16 with IArc

use of net.sf.latexdraw.models.interfaces.shape.IArc in project latexdraw by arnobl.

the class TestParsingPsarcn method testAngle1Angle2.

@Theory
public void testAngle1Angle2(@DoubleData(vals = { 100d, 200d, 20d, -200.15d }) final double angle1, @DoubleData(vals = { 100d, 200d, 20d, -200.15d }) final double angle2) {
    parser("\\psarcn{10}{" + angle1 + "}{" + angle2 + "}");
    final IArc arc = getShapeAt(0);
    assertEquals(Math.toRadians(angle2), arc.getAngleStart(), 0.0000001);
    assertEquals(Math.toRadians(angle1), arc.getAngleEnd(), 0.0000001);
}
Also used : IArc(net.sf.latexdraw.models.interfaces.shape.IArc) Theory(org.junit.experimental.theories.Theory)

Example 17 with IArc

use of net.sf.latexdraw.models.interfaces.shape.IArc in project latexdraw by arnobl.

the class TestParsingPsarcn method testParamArrowsArrows.

@Test
public void testParamArrowsArrows() {
    parser("\\psarcn[arrows=<->]{1}{30}{40}");
    final IArc arc = getShapeAt(0);
    assertEquals(ArrowStyle.RIGHT_ARROW, arc.getArrowStyle(0));
    assertEquals(ArrowStyle.LEFT_ARROW, arc.getArrowStyle(1));
}
Also used : IArc(net.sf.latexdraw.models.interfaces.shape.IArc) Test(org.junit.Test)

Aggregations

IArc (net.sf.latexdraw.models.interfaces.shape.IArc)17 Theory (org.junit.experimental.theories.Theory)12 Test (org.junit.Test)4