Code example for Region

Methods: op

0
    /** 
     * {@inheritDoc} 
     */ 
    public boolean contains(RectShape rect) {
        Region tmpRegion = new Region();
        Region targetRegion = new Region((int)rect.getX(), (int)rect.getY(),
                (int)(rect.getWidth() + rect.getX()), (int)(rect.getHeight() + rect.getY()));
        tmpRegion.op(this.mRegion, targetRegion, Op.INTERSECT );
        return ! targetRegion.op(tmpRegion, Op.XOR);
    } 
 
    /** 
     * {@inheritDoc} 
     */ 
    public boolean contains(float x, float y) {
        return mRegion.contains((int)x, (int)y);
    } 
 
    /** 
     * {@inheritDoc} 
     */