Code example for Region

0
     */ 
    public RoundRectShape(RoundRectShape rect) {
        this(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight(), rect.getRx(), rect.getRy());
         
        mPath = new Path(rect.mPath);
        mRegion = new Region(rect.mRegion);
    } 
 
    /** 
     * {@inheritDoc} 
     */ 
    public Path getPath() {
        return mPath;
    } 
 
    /** 
     * {@inheritDoc} 
     */ 
    public void draw(Canvas canvas, Paint paint) {
        paint.setStyle(Paint.Style.STROKE);