burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.13k stars 991 forks source link

Should disallow drawing on left or right of the image #379

Closed stephanepechard closed 3 years ago

stephanepechard commented 3 years ago

Describe the bug Currently, it is possible to draw on the outside (right and left only) of the selected image, due to the way the layout is set.

To Reproduce Steps to reproduce the behavior:

  1. Select an image that lets right and left sides empty (black on the demo app ;
  2. Brush on these parts ;
  3. You can see shapes on the outside of the image.

Expected behavior It is not possible to draw outside of the given image, drawing should be cropped.

Screenshot Screenshot_1626709982

Smartphone Info:

burhanrashid52 commented 3 years ago

Can we make it configurable from PhotoEditor.Builder says setShapeClip(true) by default it will be false, so that it does not break the existing behavior.

ToanNguyen97 commented 3 years ago

Hi!, this is a wonderful feature, I really need it but seems it's not have in lastest release version, right? Please tell me how I can add it, tks

burhanrashid52 commented 3 years ago

Currently it's not merged and hence not release. Will release it soon.

ToanNguyen97 commented 3 years ago

tks so much