use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class GroupShapeBase method addToRotationAngle.
@Override
default void addToRotationAngle(final Point gravCentre, final double angle) {
rotationAngleProperty().setValue(rotationAngleProperty().get() + angle);
final Point gc = getGravityCentre();
getShapes().forEach(sh -> sh.addToRotationAngle(gc, angle));
}
use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class GroupShapeBase method getFullBottomRightPoint.
@Override
@NotNull
default Point getFullBottomRightPoint() {
final double gap = getBorderGap();
final Point br = getBottomRightPoint();
br.translate(gap, gap);
return br;
}
use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class EllipseImpl method setCentre.
@Override
public void setCentre(@NotNull final Point centre) {
if (MathUtils.INST.isValidPt(centre)) {
final Point gc = getGravityCentre();
translate(centre.getX() - gc.getX(), centre.getY() - gc.getY());
}
}
use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class GridBase method mirrorVertical.
@Override
public void mirrorVertical(final double y) {
if (MathUtils.INST.isValidCoord(y)) {
final Point bl = points.get(0).verticalSymmetry(y);
final Point tl = getTopLeftPoint().verticalSymmetry(y);
points.get(0).setPoint(bl.getX(), Math.max(bl.getY(), tl.getY()));
}
}
use of net.sf.latexdraw.model.api.shape.Point in project latexdraw by arnobl.
the class GridBase method getTopRightPoint.
@Override
@NotNull
public Point getTopRightPoint() {
final Point pos = getPosition();
final double step = getStep();
return ShapeFactory.INST.createPoint(pos.getX() + step * (getGridEndX() - getGridStartX()), pos.getY() - step * (getGridEndY() - getGridStartY()));
}
Aggregations