public void setLocation(int x, int y) { setLocation((double)x, (double)y); }
public Point(double x, double y) { setLocation(x, y); }
public void move(double x, double y) { setLocation(x, y); }
public Point(Point p) { setLocation(p.x, p.y); }
public Point() { setLocation(0, 0); }
public Point(int x, int y) { setLocation(x, y); }
public void setLocation(Point p) { setLocation(p.x, p.y); }
public Point deltaTransform(Point src, Point dst) { if (dst == null) { dst = new Point(); } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01, x * m10 + y * m11); return dst; }
public Point transform(Point src, Point dst) { if (dst == null) { dst = new Point(); } double x = src.getX(); double y = src.getY(); dst.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); return dst; }
public void transform(Point[] src, int srcOff, Point[] dst, int dstOff, int length) { while (--length >= 0) { Point srcPoint = src[srcOff++]; double x = srcPoint.getX(); double y = srcPoint.getY(); Point dstPoint = dst[dstOff]; if (dstPoint == null) { dstPoint = new Point(); } dstPoint.setLocation(x * m00 + y * m01 + m02, x * m10 + y * m11 + m12); dst[dstOff++] = dstPoint; } }
public Point inverseTransform(Point src, Point dst) throws NoninvertibleTransformException { double det = getDeterminant(); if (Math.abs(det) < ZERO) { // awt.204=Determinant is zero throw new NoninvertibleTransformException("Determinant is zero. Cannot invert transformation"); //$NON-NLS-1$ } if (dst == null) { dst = new Point(); } double x = src.getX() - m02; double y = src.getY() - m12; dst.setLocation((x * m11 - y * m01) / det, (y * m00 - x * m10) / det); return dst; }
point.setLocation(point.getX() + shift[0], point.getY() + shift[1]);
point.setLocation(point.getX() + shift[0], point.getY() + shift[1]);