Search in sources :

Example 1 with ICircle

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

the class TestParsingQdisk method testLineStylePlain.

@Test
public void testLineStylePlain() {
    parser("\\psset{linestyle=dotted}\\qdisk(35pt,20pt){10pt}");
    ICircle cir = getShapeAt(0);
    assertEquals(LineStyle.SOLID, cir.getLineStyle());
}
Also used : ICircle(net.sf.latexdraw.models.interfaces.shape.ICircle) Test(org.junit.Test)

Example 2 with ICircle

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

the class TestParsingQdisk method testBorderMustBeInto.

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

Example 3 with ICircle

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

the class TestParsingQdisk method testMustBeFilled.

@Test
public void testMustBeFilled() {
    parser("\\qdisk(35pt,20pt){10pt}");
    ICircle cir = getShapeAt(0);
    assertEquals(FillingStyle.PLAIN, cir.getFillingStyle());
}
Also used : ICircle(net.sf.latexdraw.models.interfaces.shape.ICircle) Test(org.junit.Test)

Example 4 with ICircle

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

the class TestParsingPscircle method testParse2CoordinatesFloat2.

@Test
public void testParse2CoordinatesFloat2() {
    parser("\\pscircle(35.5,50.5){1.25}");
    ICircle cir = getShapeAt(0);
    assertEquals(35.5 * IShape.PPC - 1.25 * IShape.PPC, cir.getPosition().getX(), 0.001);
    assertEquals((50.5 * IShape.PPC - 1.25 * IShape.PPC) * -1d, cir.getPosition().getY(), 0.001);
    assertEquals(1.25 * IShape.PPC * 2d, cir.getWidth(), 0.0000001);
    assertEquals(1.25 * IShape.PPC * 2d, cir.getHeight(), 0.0000001);
}
Also used : ICircle(net.sf.latexdraw.models.interfaces.shape.ICircle) Test(org.junit.Test)

Example 5 with ICircle

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

the class TestParsingPscircle method testCoordinatesMissing.

@Test
public void testCoordinatesMissing() {
    parser("\\pscircle(,){1}");
    ICircle cir = getShapeAt(0);
    assertEquals(IShape.PPC - 1d * IShape.PPC, cir.getPosition().getX(), 0.0000001);
    assertEquals((IShape.PPC - 1d * IShape.PPC) * -1d, cir.getPosition().getY(), 0.0000001);
    assertEquals(1d * IShape.PPC * 2d, cir.getWidth(), 0.0000001);
    assertEquals(1d * IShape.PPC * 2d, cir.getHeight(), 0.0000001);
}
Also used : ICircle(net.sf.latexdraw.models.interfaces.shape.ICircle) Test(org.junit.Test)

Aggregations

ICircle (net.sf.latexdraw.models.interfaces.shape.ICircle)23 Test (org.junit.Test)20 HelperTest (net.sf.latexdraw.HelperTest)2 Point2D (javafx.geometry.Point2D)1 IAxes (net.sf.latexdraw.models.interfaces.shape.IAxes)1 IBezierCurve (net.sf.latexdraw.models.interfaces.shape.IBezierCurve)1 ICircleArc (net.sf.latexdraw.models.interfaces.shape.ICircleArc)1 IDot (net.sf.latexdraw.models.interfaces.shape.IDot)1 IEllipse (net.sf.latexdraw.models.interfaces.shape.IEllipse)1 IFreehand (net.sf.latexdraw.models.interfaces.shape.IFreehand)1 IGrid (net.sf.latexdraw.models.interfaces.shape.IGrid)1 IPlot (net.sf.latexdraw.models.interfaces.shape.IPlot)1 IPolygon (net.sf.latexdraw.models.interfaces.shape.IPolygon)1 IPolyline (net.sf.latexdraw.models.interfaces.shape.IPolyline)1 IRectangle (net.sf.latexdraw.models.interfaces.shape.IRectangle)1 IRhombus (net.sf.latexdraw.models.interfaces.shape.IRhombus)1 ISquare (net.sf.latexdraw.models.interfaces.shape.ISquare)1 IText (net.sf.latexdraw.models.interfaces.shape.IText)1 ITriangle (net.sf.latexdraw.models.interfaces.shape.ITriangle)1