Mantis icon indicating copy to clipboard operation
Mantis copied to clipboard

Add support for changing shapes from crop view toolbar

Open roddymunro opened this issue 3 years ago • 3 comments

It would be great to have a way to change the shape from the crop view toolbar, just like we can change the ratios. For example, tapping on the 'shape' button in the toolbar would bring up a list of shapes, and tapping one would change the crop shape. This list of shapes could be set in the config, just in case the programmer doesn't want to show the heart or star in the list.

I had a go at this, but didn't get very far due to time constraints and limited knowledge of the codebase. Adding this enhancement request in case somebody else wants to have a go at this.

roddymunro avatar Nov 23 '21 02:11 roddymunro

Good suggestion! I can add this feature in the next release.

guoyingtao avatar Nov 23 '21 02:11 guoyingtao

Awesome!! Something else I was toying with was adding a slider for the corner radius when .roundedRect is selected, and hiding this slider when a different shape is selected. Not sure if that's something worth adding too.

roddymunro avatar Nov 23 '21 02:11 roddymunro

I will think about it. Maybe I just expose some APIs to allow user to add extra controls. 🤔

guoyingtao avatar Nov 23 '21 02:11 guoyingtao

@roddymunro I know this issue has been here for a long time. Now when I check it again, I think there might not be many people having this requirement. Also you can always provide crop shape options when creating CropViewController, like the one demo in the Example project image For adding a slider for the corner radius, you can always do it in your own UIs.

So I decide to close this issue for now. You can reopen it anytime if you want to discuss more.

guoyingtao avatar Jun 23 '23 05:06 guoyingtao