use of javafx.scene.shape.Arc in project latexdraw by arnobl.
the class TestViewCircleArc method testClipArrowSameStartEndNotEmptyClip.
@Theory
public void testClipArrowSameStartEndNotEmptyClip(final ArcStyle style) {
assumeTrue(style.supportArrow());
model.setArcStyle(style);
model.setAngleStart(0d);
model.setAngleEnd(0d);
model.setArrowLength(0d);
model.setArrowStyle(ArrowStyle.RIGHT_ARROW, 0);
model.setArrowStyle(ArrowStyle.RIGHT_DBLE_ARROW, -1);
WaitForAsyncUtils.waitForFxEvents();
final Arc clip = (Arc) view.border.getClip();
assertNotEquals(clip.getLength(), 0d);
}
use of javafx.scene.shape.Arc in project latexdraw by arnobl.
the class TestViewCircleArc method testClipArrowSameDimensions.
@Theory
public void testClipArrowSameDimensions(final ArcStyle style) {
assumeTrue(style.supportArrow());
model.setArcStyle(style);
model.setArrowStyle(ArrowStyle.RIGHT_ARROW, 0);
model.setArrowStyle(ArrowStyle.RIGHT_DBLE_ARROW, -1);
WaitForAsyncUtils.waitForFxEvents();
final Arc clip = (Arc) view.border.getClip();
assertEquals(clip.getCenterX(), view.border.getCenterX(), 0.0001);
assertEquals(clip.getCenterY(), view.border.getCenterY(), 0.0001);
assertEquals(clip.getRadiusX(), view.border.getRadiusX(), 0.0001);
assertEquals(clip.getRadiusY(), view.border.getRadiusY(), 0.0001);
}
use of javafx.scene.shape.Arc in project latexdraw by arnobl.
the class TestViewCircleArc method testSetAngleStartMainBorder.
@Theory
public void testSetAngleStartMainBorder(final Function<ViewCircleArc, Arc> fct) {
final Arc arc = fct.apply(view);
final double startAngle = arc.getStartAngle();
final double angle = model.getAngleStart() + Math.PI / 4d;
model.setAngleStart(angle);
WaitForAsyncUtils.waitForFxEvents();
assertNotEquals(arc.getStartAngle(), startAngle);
assertEquals(Math.toDegrees(angle), arc.getStartAngle(), 0.00001);
}
use of javafx.scene.shape.Arc in project aima-java by aimacode.
the class VacuumEnvironmentViewCtrl method createAgentRep.
protected Node createAgentRep(boolean suck) {
Arc arc = new Arc();
arc.setRadiusX(0.3 * envStateView.getWidth() / locations.size());
arc.setRadiusY(0.3 * envStateView.getWidth() / locations.size());
arc.setStartAngle(45.0f);
arc.setLength(suck ? 360.0f : 270.0f);
arc.setType(ArcType.ROUND);
arc.setFill(Color.RED);
return arc;
}
use of javafx.scene.shape.Arc in project latexdraw by arnobl.
the class TestViewCircleArc method testSetAngleStartMainBorderLength.
@Theory
public void testSetAngleStartMainBorderLength(final Function<ViewCircleArc, Arc> fct) {
final Arc arc = fct.apply(view);
final double length = arc.getLength();
final double angle = model.getAngleStart() + Math.PI / 4d;
model.setAngleStart(angle);
WaitForAsyncUtils.waitForFxEvents();
assertNotEquals(arc.getLength(), length);
assertEquals(Math.toDegrees(model.getAngleEnd() - model.getAngleStart()), arc.getLength(), 0.0001);
}
Aggregations