Code example for Region

Methods: contains

0
 
    /** 
     * {@inheritDoc} 
     */ 
    public boolean contains(float x, float y, float width, float height) {
        if (this.mRegion.contains((int)x, (int)y) &&
                this.mRegion.contains((int)x, (int)(y + height)) &&
                this.mRegion.contains((int)(x + width), (int)y) &&
                this.mRegion.contains((int)(x + width), (int)(y + height)) 
                ) { 
            return true; 
        } 
        return false; 
    } 
 
    /** 
     * {@inheritDoc} 
     */ 
    public boolean contains(PointF point) {
        return mRegion.contains((int)point.x, (int)point.y);