avito-tech / krop

Small widget for image cropping in Instagram-like style
MIT License
126 stars 18 forks source link

getCropRect is private :( #8

Closed JWvanV closed 3 years ago

JWvanV commented 6 years ago

I'd love to use this rectangle, but that doesn't work if the method is private ;)

solkin commented 6 years ago

Sorry for this inconvenience. For now, you can use method getTransformation(), that returns Transformation object.

JWvanV commented 6 years ago

I did find that method, no worries :) I was also wondering if it would be possible to apply an initial cropping (instead of the default center crop) when setting the image uri.

The use case would be that a user crops an image in an activity, saves this and closes the activity, but would be able to adjust the cropping again, by re-opening the activity, where the stored cropping would be applied initially on the whole image.

solkin commented 6 years ago

For now, KropView can save state and restore. But, of course, it will be helpful to manually restore state.

Kutashov commented 3 years ago

@Spoetnic Hi, there! It is better late, than never: we have the getTransformation() and setTransformation() methods for restoring images' state. You don't need to use getCropRect() anymore.

Kutashov commented 3 years ago

I suppose we've done here, I close this issue.