Code example for Region

Methods: getBoundsop

0
     * {@inheritDoc}  
     */ 
    //TODO change more appropriate method 
    public boolean intersects(float x, float y, float width, float height) {
        float tmpx, tmpy, tmpw, tmph;
        Region region = new Region(mRegion);
        if (x < width + x) {
            tmpx = x;
            tmpw = width;
        } 
        else{ 
            tmpx = width + x;
            tmpw = Math.abs(width); 
        } 
        if (y < height + y) {
            tmpy = y;
            tmph = height;
        } 
        else{ 
            tmpy = height + y;
            tmph = Math.abs(height); 
        } 
        region.getBounds();
        return region.op((int)tmpx, (int)tmpy, (int)(tmpx + tmpw), (int)(tmpy + tmph), Op.INTERSECT);
    } 
 
    /** 
     * {@inheritDoc}  
     */ 
Stop searching for code, let great code find you!  Add Codota to your java IDE