Search in sources :

Example 11 with Circle

use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.

the class TestParsingQdisk method testNoShadow.

@Test
public void testNoShadow() {
    parser("\\psset{shadow=true}\\qdisk(35pt,20pt){10pt}");
    final Circle cir = getShapeAt(0);
    assertFalse(cir.hasShadow());
}
Also used : Circle(net.sf.latexdraw.model.api.shape.Circle) Test(org.junit.jupiter.api.Test)

Example 12 with Circle

use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.

the class TestParsingQdisk method testBorderMustBeInto.

@Test
public void testBorderMustBeInto() {
    parser("\\psset{dimen=middle}\\qdisk(35pt,20pt){10pt}");
    final Circle cir = getShapeAt(0);
    assertEquals(BorderPos.INTO, cir.getBordersPosition());
}
Also used : Circle(net.sf.latexdraw.model.api.shape.Circle) Test(org.junit.jupiter.api.Test)

Example 13 with Circle

use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.

the class TestParsingQdisk method testNoDbleBord.

@Test
public void testNoDbleBord() {
    parser("\\psset{doubleline=true}\\qdisk(35pt,20pt){10pt}");
    final Circle cir = getShapeAt(0);
    assertFalse(cir.hasDbleBord());
}
Also used : Circle(net.sf.latexdraw.model.api.shape.Circle) Test(org.junit.jupiter.api.Test)

Example 14 with Circle

use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.

the class TestParsingPscircle method testFloatSigns.

@Test
public void testFloatSigns() {
    parser("\\pscircle(+++35.5,--50.5){--+12}");
    final Circle cir = getShapeAt(0);
    assertEquals(35.5 * Shape.PPC - 12d * Shape.PPC, cir.getPosition().getX(), 0.001);
    assertEquals((50.5 * Shape.PPC - 12d * Shape.PPC) * -1d, cir.getPosition().getY(), 0.001);
    assertEquals(12d * Shape.PPC * 2d, cir.getWidth(), 0.0000001);
    assertEquals(12d * Shape.PPC * 2d, cir.getHeight(), 0.0000001);
}
Also used : Circle(net.sf.latexdraw.model.api.shape.Circle) Test(org.junit.jupiter.api.Test)

Example 15 with Circle

use of net.sf.latexdraw.model.api.shape.Circle in project latexdraw by arnobl.

the class TestParsingPscircle method testCoordinatesMm.

@Test
public void testCoordinatesMm() {
    parser("\\pscircle(350mm,200mm){10mm}");
    final Circle cir = getShapeAt(0);
    assertEquals(35d * Shape.PPC - 1d * Shape.PPC, cir.getPosition().getX(), 0.001);
    assertEquals((20d * Shape.PPC - 1d * Shape.PPC) * -1d, cir.getPosition().getY(), 0.001);
    assertEquals(1d * Shape.PPC * 2d, cir.getWidth(), 0.0000001);
    assertEquals(1d * Shape.PPC * 2d, cir.getHeight(), 0.0000001);
}
Also used : Circle(net.sf.latexdraw.model.api.shape.Circle) Test(org.junit.jupiter.api.Test)

Aggregations

Circle (net.sf.latexdraw.model.api.shape.Circle)21 Test (org.junit.jupiter.api.Test)17 Test (org.junit.Test)3 HelperTest (net.sf.latexdraw.HelperTest)2 Point2D (javafx.geometry.Point2D)1 Axes (net.sf.latexdraw.model.api.shape.Axes)1 BezierCurve (net.sf.latexdraw.model.api.shape.BezierCurve)1 CircleArc (net.sf.latexdraw.model.api.shape.CircleArc)1 Dot (net.sf.latexdraw.model.api.shape.Dot)1 Ellipse (net.sf.latexdraw.model.api.shape.Ellipse)1 Freehand (net.sf.latexdraw.model.api.shape.Freehand)1 Grid (net.sf.latexdraw.model.api.shape.Grid)1 Plot (net.sf.latexdraw.model.api.shape.Plot)1 Polygon (net.sf.latexdraw.model.api.shape.Polygon)1 Polyline (net.sf.latexdraw.model.api.shape.Polyline)1 Rectangle (net.sf.latexdraw.model.api.shape.Rectangle)1 Rhombus (net.sf.latexdraw.model.api.shape.Rhombus)1 Square (net.sf.latexdraw.model.api.shape.Square)1 Text (net.sf.latexdraw.model.api.shape.Text)1 Triangle (net.sf.latexdraw.model.api.shape.Triangle)1