src/main/java/ucar/geoapi/NetcdfProjection.java
@Override
    public Shape createTransformedShape(final Shape shape) throws TransformException {
        final PathIterator it = shape.getPathIterator(null);
        final Path2D path = new Path2D.Double(it.getWindingRule());
        final double[] b = new double[6];
        while (!it.isDone()) {
            final int mode = it.currentSegment(b);
            switch (mode) {
                case PathIterator.SEG_CLOSE:   path.closePath(); break;
                case PathIterator.SEG_MOVETO:  transform(b, 0, b, 0, 1); path.moveTo (b[0], b[1]); break;
                case PathIterator.SEG_LINETO:  transform(b, 0, b, 0, 1); path.lineTo (b[0], b[1]); break;
                case PathIterator.SEG_QUADTO:  transform(b, 0, b, 0, 2); path.quadTo (b[0], b[1], b[2], b[3]); break;
                case PathIterator.SEG_CUBICTO: transform(b, 0, b, 0, 3); path.curveTo(b[0], b[1], b[2], b[3], b[4], b[5]); break;
                default: throw new AssertionError(mode);
            }
            it.next();
        }
        return path;
    }
/**
     * Transforms the specified shape. The default implementation returns a new shape with
     * the transform of all control points.
     *
     * @param  shape  the Shape to transform.
     * @return the transformed shape.
     * @throws TransformException if a transform failed.
     */
Transforms the specified shape. The default implementation returns a new shape with
the transform of all control points.

@param  shape  the Shape to transform.
@return the transformed shape.
@throws TransformException if a transform failed.
Transforms the specified shape . The default implementation returns a new shape with the transform of all control points . @param shape the Shape to transform . @return the transformed shape . @throws TransformException if a transform failed .
@Override
    public Shape createTransformedShape(final Shape shape) throws TransformException {
        final PathIterator it = shape.getPathIterator(null);
        final Path2D path = new Path2D.Double(it.getWindingRule());
        final double[] b = new double[6];
        while (!it.isDone()) {
            final int mode = it.currentSegment(b);
            switch (mode) {
                case PathIterator.SEG_CLOSE:   path.closePath(); break;
                case PathIterator.SEG_MOVETO:  transform(b, 0, b, 0, 1); path.moveTo (b[0], b[1]); break;
                case PathIterator.SEG_LINETO:  transform(b, 0, b, 0, 1); path.lineTo (b[0], b[1]); break;
                case PathIterator.SEG_QUADTO:  transform(b, 0, b, 0, 2); path.quadTo (b[0], b[1], b[2], b[3]); break;
                case PathIterator.SEG_CUBICTO: transform(b, 0, b, 0, 3); path.curveTo(b[0], b[1], b[2], b[3], b[4], b[5]); break;
                default: throw new AssertionError(mode);
            }
            it.next();
        }
        return path;
    }
@ Override public Shape createTransformedShape ( final Shape shape ) throws TransformException { final PathIterator it = shape . getPathIterator ( null ) ; final Path2D path = new Path2D . Double ( it . getWindingRule ( ) ) ; final double [ ] b = new double [ 6 ] ; while ( ! it . isDone ( ) ) { final int mode = it . currentSegment ( b ) ; switch ( mode ) { case PathIterator . SEG_CLOSE : path . closePath ( ) ; break ; case PathIterator . SEG_MOVETO : transform ( b , 0 , b , 0 , 1 ) ; path . moveTo ( b [ 0 ] , b [ 1 ] ) ; break ; case PathIterator . SEG_LINETO : transform ( b , 0 , b , 0 , 1 ) ; path . lineTo ( b [ 0 ] , b [ 1 ] ) ; break ; case PathIterator . SEG_QUADTO : transform ( b , 0 , b , 0 , 2 ) ; path . quadTo ( b [ 0 ] , b [ 1 ] , b [ 2 ] , b [ 3 ] ) ; break ; case PathIterator . SEG_CUBICTO : transform ( b , 0 , b , 0 , 3 ) ; path . curveTo ( b [ 0 ] , b [ 1 ] , b [ 2 ] , b [ 3 ] , b [ 4 ] , b [ 5 ] ) ; break ; default : throw new AssertionError ( mode ) ; } it . next ( ) ; } return path ; }
Transforms the specified shape.
Transforms the specified shape .