-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support programatic zoom #62
Conversation
Thank you for submitting the PR! |
The Image should be zoomed around a specified point, but this is not currently the case. I will explain the case of zoomToOnContentCoordinate using a sample image.
The same problem exists with zoomToOnLayoutCoordinate. |
I have just merged another branch to main branch. In it, there is an internal function called changeScale. And I think zoomToOnContentCoordinate can be achieved by transforming the coordinates and calling zoomToOnLayoutCoordinate. |
Sorry for the consecutive posts. |
Yes! I have created this Pull Request with the intention of implementing the functionality to center a specified point on the screen. |
scale: Float = 3f, | ||
animationSpec: AnimationSpec<Float> = tween(700), | ||
) = coroutineScope { | ||
val fitContentSizeFactor = fitContentSize.width / contentSize.height |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@masato1230
fitContentSizeFactor is calculated in width / height, but not width / width?
val fitContentSizeFactor = fitContentSize.width / contentSize.height | |
val fitContentSizeFactor = fitContentSize.width / contentSize.width |
@masato1230
|
@usuiat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍 Thanks.
Description
Add two functions that allow zooming to be executed programmatically.
Sample(Capture)
device-2023-05-25-002658.mp4
Sample code used in video