/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && (getSourceDimensions() == 2) && (getTargetDimensions() == 2); }
/** * Transforms the specified {@code ptSrc} and stores the result in {@code ptDst}. * This method is a copy of {@link AbstractMathTransform2D#transform(Point2D, Point2D)}. */ @Override public Point2D transform(final Point2D ptSrc, final Point2D ptDst) throws TransformException { final double[] ord = new double[] {ptSrc.getX(), ptSrc.getY()}; transform(ord, 0, ord, 0, false); if (ptDst != null) { ptDst.setLocation(ord[0], ord[1]); return ptDst; } else { return new Point2D.Double(ord[0], ord[1]); } }
(MathTransform2D) tr2); } else { return new ConcatenatedTransform2D(tr1, tr2);
(MathTransform2D) tr2); } else { return new ConcatenatedTransform2D(tr1, tr2);
transform = new ConcatenatedTransform2D(first, second); validate(); verifyTransform(source, target);
/** * Checks if transforms are compatibles with this implementation. */ @Override boolean isValid() { return super.isValid() && (getSourceDimensions() == 2) && (getTargetDimensions() == 2); }
/** * Transforms the specified {@code ptSrc} and stores the result in {@code ptDst}. * This method is a copy of {@link AbstractMathTransform2D#transform(Point2D, Point2D)}. */ @Override public Point2D transform(final Point2D ptSrc, final Point2D ptDst) throws TransformException { final double[] ord = new double[] {ptSrc.getX(), ptSrc.getY()}; transform(ord, 0, ord, 0, false); if (ptDst != null) { ptDst.setLocation(ord[0], ord[1]); return ptDst; } else { return new Point2D.Double(ord[0], ord[1]); } }