Search in sources :

Example 16 with ICircle

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

the class PSTLatexdrawListener method exitPsqdisk.

@Override
public void exitPsqdisk(final net.sf.latexdraw.parsers.pst.PSTParser.PsqdiskContext ctx) {
    final ICircle circle = ShapeFactory.INST.createCircle();
    setCircle(circle, ctx.pstctx.coordToAdjustedPoint(ctx.coord()), ctx.pstctx.valDimtoDouble(ctx.bracketValueDim().valueDim()) * PSTContext.PPC, ctx.pstctx, true);
    shapes.peek().addShape(circle);
}
Also used : ICircle(net.sf.latexdraw.models.interfaces.shape.ICircle)

Example 17 with ICircle

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

the class PSTLatexdrawListener method exitPscircle.

@Override
public void exitPscircle(final net.sf.latexdraw.parsers.pst.PSTParser.PscircleContext ctx) {
    final ICircle circle = ShapeFactory.INST.createCircle();
    setCircle(circle, ctx.pstctx.coordToAdjustedPoint(ctx.centre), ctx.pstctx.valDimtoDouble(ctx.bracketValueDim().valueDim()) * PSTContext.PPC, ctx.pstctx, ctx.pstctx.starredCmd(ctx.cmd));
    shapes.peek().addShape(circle);
}
Also used : ICircle(net.sf.latexdraw.models.interfaces.shape.ICircle)

Example 18 with ICircle

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

the class TestParsingQdisk method testNoDbleBord.

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

Example 19 with ICircle

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

the class TestParsingQdisk method testLineColourIsFillColour.

@Test
public void testLineColourIsFillColour() {
    parser("\\psset{linecolor=green}\\qdisk(35pt,20pt){10pt}");
    ICircle cir = getShapeAt(0);
    assertEquals(DviPsColors.GREEN, cir.getFillingCol());
    assertEquals(DviPsColors.GREEN, cir.getLineColour());
}
Also used : ICircle(net.sf.latexdraw.models.interfaces.shape.ICircle) Test(org.junit.Test)

Example 20 with ICircle

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

the class TestParsingQdisk method testNoShadow.

@Test
public void testNoShadow() {
    parser("\\psset{shadow=true}\\qdisk(35pt,20pt){10pt}");
    ICircle cir = getShapeAt(0);
    assertFalse(cir.hasShadow());
}
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