Search code examples
kineticjs

KineticJS crop image after apply vertical flip


How can i crop a image after apply vertical flip on image? I'm using jCrop to get x, y, width and height.

Thx


Solution

  • You didn't share enough information to help with code.

    But clipping is done on a container, so

    1. Put your image in a group,
    2. Flip your image,
    3. Do the clip with myGroup.clip({x:clipX,y:clipY,width:clipWidth,height:clipHeight:});

    You'll have a flipped and clipped image!