Code example for Path

Methods: computeBoundstransform

0
            throw new IllegalArgumentException("Null 'shape' argument.");
        } 
        Matrix mat = new Matrix();
        mat.postTranslate((float)transX, (float)transY);
         
        Path path = new Path(shape.getPath());
        path.transform(mat);
         
        RectF rect = new RectF();
        path.computeBounds(rect, false);
         
        return new PathShape(path);
    } 
 
    /** 
     * Translates a shape to a new location such that the anchor point (relative 
     * to the rectangular bounds of the shape) aligns with the specified (x, y) 
     * coordinate in Java2D space. 
     *  
     * @param shape 
     *            the shape (<code>null</code> not permitted).