Code example for Region

Methods: getBounds

0
        _rect = new Rect();
    } 
 
    @Override 
    public String getName() {
        return "Rectangle"; 
    } 
 
    @Override 
    public void draw(Canvas canvas, Paint paint, Region region) {
 
        if(_rect.isEmpty()){
 
            _rect.set(getRectWithDefaultMargins(region));
            draw(canvas, paint);
            reset(); 
        } 
    } 
 
    @Override 
    public void draw(Canvas canvas, Paint paint) {