Search in sources :

Example 26 with IAxes

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

the class TestSVGAxes method testAxesStyle.

@Theory
public void testAxesStyle(@AxesData final IAxes sh, final AxesStyle style) {
    sh.setAxesStyle(style);
    final IAxes s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsAxes(sh, s2);
}
Also used : IAxes(net.sf.latexdraw.models.interfaces.shape.IAxes) Theory(org.junit.experimental.theories.Theory)

Example 27 with IAxes

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

the class TestSVGArrowable method testArrowBracketParamsArr2.

@Theory
public void testArrowBracketParamsArr2(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
    assumeTrue(arr2.isSquareBracket());
    assumeFalse(sh instanceof IAxes);
    sh.setArrowStyle(arr1, 0);
    sh.setArrowStyle(arr2, -1);
    final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowBracket(sh.getArrowAt(-1), s2.getArrowAt(-1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) IAxes(net.sf.latexdraw.models.interfaces.shape.IAxes) Theory(org.junit.experimental.theories.Theory)

Example 28 with IAxes

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

the class TestSVGArrowable method testArrowBracketParamsArr1.

@Theory
public void testArrowBracketParamsArr1(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
    assumeTrue(arr1.isSquareBracket());
    assumeFalse(sh instanceof IAxes);
    sh.setArrowStyle(arr1, 0);
    sh.setArrowStyle(arr2, -1);
    final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowBracket(sh.getArrowAt(0), s2.getArrowAt(0));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) IAxes(net.sf.latexdraw.models.interfaces.shape.IAxes) Theory(org.junit.experimental.theories.Theory)

Example 29 with IAxes

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

the class TestSVGArrowable method testArrowArrowParamsArr1.

@Theory
public void testArrowArrowParamsArr1(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
    assumeTrue(arr1.isArrow());
    assumeFalse(sh instanceof IAxes);
    sh.setArrowStyle(arr1, 0);
    sh.setArrowStyle(arr2, -1);
    final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowArrow(sh.getArrowAt(0), s2.getArrowAt(0));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) IAxes(net.sf.latexdraw.models.interfaces.shape.IAxes) Theory(org.junit.experimental.theories.Theory)

Example 30 with IAxes

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

the class TestSVGArrowable method testArrowBarParamsArr2.

@Theory
public void testArrowBarParamsArr2(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
    assumeTrue(arr2.isBar());
    assumeFalse(sh instanceof IAxes);
    sh.setArrowStyle(arr1, 0);
    sh.setArrowStyle(arr2, -1);
    final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowBar(sh.getArrowAt(-1), s2.getArrowAt(-1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) IAxes(net.sf.latexdraw.models.interfaces.shape.IAxes) Theory(org.junit.experimental.theories.Theory)

Aggregations

IAxes (net.sf.latexdraw.models.interfaces.shape.IAxes)50 Theory (org.junit.experimental.theories.Theory)28 Test (org.junit.Test)12 IArrowableSingleShape (net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape)10 HelperTest (net.sf.latexdraw.HelperTest)7 IShape (net.sf.latexdraw.models.interfaces.shape.IShape)5 PlottingStyle (net.sf.latexdraw.models.interfaces.shape.PlottingStyle)4 TicksStyle (net.sf.latexdraw.models.interfaces.shape.TicksStyle)4 IDot (net.sf.latexdraw.models.interfaces.shape.IDot)3 IPoint (net.sf.latexdraw.models.interfaces.shape.IPoint)3 IRectangle (net.sf.latexdraw.models.interfaces.shape.IRectangle)3 Collections (java.util.Collections)2 ShapeData (net.sf.latexdraw.data.ShapeData)2 ShapeFactory (net.sf.latexdraw.models.ShapeFactory)2 ArrowStyle (net.sf.latexdraw.models.interfaces.shape.ArrowStyle)2 AxesStyle (net.sf.latexdraw.models.interfaces.shape.AxesStyle)2 BorderPos (net.sf.latexdraw.models.interfaces.shape.BorderPos)2 DotStyle (net.sf.latexdraw.models.interfaces.shape.DotStyle)2 FillingStyle (net.sf.latexdraw.models.interfaces.shape.FillingStyle)2 IGroup (net.sf.latexdraw.models.interfaces.shape.IGroup)2