use of net.sf.latexdraw.models.interfaces.shape.IArrow in project latexdraw by arnobl.
the class GenericViewArrow method updatePath.
default void updatePath(final boolean isShadow) {
final IArrow arrow = getArrow();
final ILine arrowLine = arrow.getArrowLine();
if (arrow.getArrowStyle() == ArrowStyle.NONE || arrowLine == null || !arrow.hasStyle()) {
return;
}
final IPoint pt1 = arrowLine.getPoint1();
final IPoint pt2 = arrowLine.getPoint2();
setTranslation(pt1.getX(), pt1.getY());
switch(arrow.getArrowStyle()) {
case BAR_END:
updatePathBarEnd(isShadow);
break;
case BAR_IN:
updatePathBarIn(pt1, pt2, isShadow);
break;
case CIRCLE_END:
case DISK_END:
updatePathDiskCircleEnd(isShadow);
break;
case CIRCLE_IN:
case DISK_IN:
updatePathDiskCircleIn(pt1, pt2, isShadow);
break;
case RIGHT_ARROW:
case LEFT_ARROW:
updatePathRightLeftArrow(isShadow);
break;
case RIGHT_DBLE_ARROW:
case LEFT_DBLE_ARROW:
updatePathDoubleLeftRightArrow(isShadow);
break;
case RIGHT_ROUND_BRACKET:
case LEFT_ROUND_BRACKET:
updatePathRoundLeftRightBracket(isShadow);
break;
case LEFT_SQUARE_BRACKET:
case RIGHT_SQUARE_BRACKET:
updatePathRightLeftSquaredBracket(isShadow);
break;
case SQUARE_END:
updatePathSquareEnd(pt1, pt2, isShadow);
break;
case ROUND_END:
updatePathRoundEnd(isShadow);
break;
case ROUND_IN:
updatePathRoundIn(pt1, pt2, isShadow);
break;
case NONE:
break;
}
}
use of net.sf.latexdraw.models.interfaces.shape.IArrow in project latexdraw by arnobl.
the class GenericViewArrow method updatePathRoundLeftRightBracket.
default void updatePathRoundLeftRightBracket(final boolean isShadow) {
final IArrow arrow = getArrow();
final double width = arrow.getBarShapedArrowWidth();
final double widtharc = arrow.getRBracketNum() * width * 2d;
final double xarc = -widtharc / 2d;
final double angle = -50d;
createArc(xarc, 0d, widtharc / 2d, width / 2d, angle, 100d, createLineOrShadColBinding(isShadow), arrow.getShape().thicknessProperty());
if (arrow.isInverted()) {
setRotation180();
}
}
use of net.sf.latexdraw.models.interfaces.shape.IArrow in project latexdraw by arnobl.
the class GenericViewArrow method updatePathRoundIn.
default void updatePathRoundIn(final IPoint pt1, final IPoint pt2, final boolean isShadow) {
final IArrow arrow = getArrow();
final double lineWidth = arrow.getShape().getFullThickness() / 2d;
createCircle(isArrowInPositiveDirection(pt1, pt2) ? lineWidth : -lineWidth, 0d, lineWidth);
setStrokeFillDiskCircle(isShadow);
}
use of net.sf.latexdraw.models.interfaces.shape.IArrow in project latexdraw by arnobl.
the class GenericViewArrow method updatePathDiskCircleIn.
default void updatePathDiskCircleIn(final IPoint pt1, final IPoint pt2, final boolean isShadow) {
final IArrow arrow = getArrow();
final double arrowRadius = arrow.getRoundShapedArrowRadius();
final double lineWidth = arrow.getShape().getFullThickness();
createCircle(isArrowInPositiveDirection(pt1, pt2) ? arrowRadius : -arrowRadius, 0d, arrowRadius - lineWidth / 2d);
setCircleStrokeWidth(lineWidth);
setStrokeFillDiskCircle(isShadow);
}
use of net.sf.latexdraw.models.interfaces.shape.IArrow in project latexdraw by arnobl.
the class GenericViewArrow method updatePathDiskCircleEnd.
default void updatePathDiskCircleEnd(final boolean isShadow) {
final IArrow arrow = getArrow();
final double lineWidth = arrow.getShape().getFullThickness();
final double arrowRadius = arrow.getRoundShapedArrowRadius();
createCircle(0d, 0d, arrowRadius - lineWidth / 2d);
setCircleStrokeWidth(lineWidth);
setStrokeFillDiskCircle(isShadow);
}
Aggregations