Code example for Path

Methods: computeBoundsisEmpty

0
            invalidate(); 
        } 
    } 
 
    private void checkCurrentPathInBounds() { 
        if ((listener != null) && !normalizedPath.isEmpty()) {
            RectF r = new RectF();
            normalizedPath.computeBounds(r, false);
            if (r.intersects(0, 0, 1, 1)) {
                listener.onDoodleInPhotoBounds();
            } 
        } 
    } 
 
    @Override 
    public boolean onTouchEvent(MotionEvent event) {
        super.onTouchEvent(event);
 
        if (isEnabled()) { 
            float x = event.getX();
            float y = event.getY();