Search in sources :

Example 26 with BezierCurve

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

the class TestShapeFactory method testCreateBezierCurveFromSameNbPoints.

@Test
void testCreateBezierCurveFromSameNbPoints() {
    BezierCurve bc = ShapeFactory.INST.createBezierCurve(Collections.singletonList(ShapeFactory.INST.createPoint()));
    bc = ShapeFactory.INST.createBezierCurveFrom(bc, ShapeFactory.INST.createPoint(1d, 2d));
    assertEquals(bc.getNbPoints(), bc.getFirstCtrlPts().size());
}
Also used : BezierCurve(net.sf.latexdraw.model.api.shape.BezierCurve) Test(org.junit.jupiter.api.Test) HelperTest(net.sf.latexdraw.HelperTest)

Aggregations

BezierCurve (net.sf.latexdraw.model.api.shape.BezierCurve)26 Test (org.junit.jupiter.api.Test)16 HelperTest (net.sf.latexdraw.HelperTest)6 Point (net.sf.latexdraw.model.api.shape.Point)4 Test (org.junit.Test)4 Polygon (net.sf.latexdraw.model.api.shape.Polygon)3 ArrayList (java.util.ArrayList)2 Freehand (net.sf.latexdraw.model.api.shape.Freehand)2 Polyline (net.sf.latexdraw.model.api.shape.Polyline)2 Shape (net.sf.latexdraw.model.api.shape.Shape)2 NotNull (org.jetbrains.annotations.NotNull)2 Click (io.github.interacto.jfx.interaction.library.Click)1 DnD (io.github.interacto.jfx.interaction.library.DnD)1 MultiClick (io.github.interacto.jfx.interaction.library.MultiClick)1 PointsData (io.github.interacto.jfx.interaction.library.PointsData)1 Press (io.github.interacto.jfx.interaction.library.Press)1 Point2D (java.awt.geom.Point2D)1 Arrays (java.util.Arrays)1 Objects (java.util.Objects)1 Function (java.util.function.Function)1