Code example for Region

0
        } 
        return buffer;
    } 
 
    public static class RegionView extends FrameLayout {
        private final Region mRegion = new Region();
        private float mClipPosition = 0.0f;
 
        public RegionView(Context c) {
            super(c);
        } 
 
        public float getClipPosition() { 
            return mClipPosition;
        } 
 
        public void setClipPosition(float clipPosition) {
            mClipPosition = clipPosition;
            invalidate();
        }