public void setShadow(Shadow.ShadowJSO shadow) { if (Objects.nonNull(shadow)) { context.setShadowColor(shadow.getColor()); context.setShadowOffsetX(shadow.getOffset().getX()); context.setShadowOffsetY(shadow.getOffset().getY()); context.setShadowBlur(shadow.getBlur()); } else { context.setShadowColor("transparent"); context.setShadowOffsetX(0); context.setShadowOffsetY(0); context.setShadowBlur(0); } }
public Point2DArrayJSO noAdjacentPoints() { final Point2DArrayJSO no = Point2DArrayJSO.make(); final int sz = this.length(); if (sz < 1) { return no; } Point2D.Point2DJSO p1 = this.get(0); no.push(Point2D.Point2DJSO.make(p1.getX(), p1.getY())); if (sz < 2) { return no; } for (int i = 1; i < sz; i++) { final Point2D.Point2DJSO p2 = this.get(i); if (!((p1.getX() == p2.getX()) && (p1.getY() == p2.getY()))) { no.push(Point2D.Point2DJSO.make(p2.getX(), p2.getY())); } p1 = p2; } return no; }
public Point2DArrayJSO noAdjacentPoints() { final Point2DArrayJSO no = Point2DArrayJSO.make(); final int sz = this.length(); if (sz < 1) { return no; } Point2D.Point2DJSO p1 = this.get(0); no.push(Point2D.Point2DJSO.make(p1.getX(), p1.getY())); if (sz < 2) { return no; } for (int i = 1; i < sz; i++) { final Point2D.Point2DJSO p2 = this.get(i); if (!((p1.getX() == p2.getX()) && (p1.getY() == p2.getY()))) { no.push(Point2D.Point2DJSO.make(p2.getX(), p2.getY())); } p1 = p2; } return no; }
public final double distance(final Point2DJSO other) { return distance(this, other); }
public final double distance(final Point2DJSO other) { return distance(this, other); }
public final double dot(final Point2D p) { return m_jso.dot(p.getJSO()); }
public final Point2D copy() { return new Point2D(m_jso.copy()); }
public Point2D(final Point2D p) { this(p.getJSO().copy()); }
/** * Returns a new point by adding the coordinates of this point and point P, * i.e. (this.x + p.x, this.y + p.y) * <p> * This Point2D is not modified. * * @param p Point2D * @return a new Point2D */ public final Point2D add(final Point2D p) { return new Point2D(m_jso.add(p.getJSO())); }
public final double dot(final Point2D p) { return m_jso.dot(p.getJSO()); }
/** * Returns a new point by adding the coordinates of this point and point P, * i.e. (this.x + p.x, this.y + p.y) * <p> * This Point2D is not modified. * * @param p Point2D * @return a new Point2D */ public final Point2D add(final Point2D p) { return new Point2D(m_jso.add(p.getJSO())); }
public Point2D(final Point2D p) { this(p.getJSO().copy()); }
public final double distance(Point2DJSO other) { return distance(this, other); }
public final Point2D copy() { return new Point2D(m_jso.copy()); }
/** * Returns a new point by adding the coordinates of this point and point P, * i.e. (this.x + p.x, this.y + p.y) * <p> * This Point2D is not modified. * * @param p Point2D * @return a new Point2D */ public final Point2D add(Point2D p) { return new Point2D(m_jso.add(p.getJSO())); }
public final double distance(final Point2DJSO other) { return distance(this, other); }
/** * Returns a new point by adding the coordinates of this point and point P, * i.e. (this.x + p.x, this.y + p.y) * <p> * This Point2D is not modified. * * @param p Point2D * @return a new Point2D */ public final Point2D add(final Point2D p) { return new Point2D(m_jso.add(p.getJSO())); }
public final Point2D copy() { return new Point2D(m_jso.copy()); }