Cant free move image
miladesign opened this issue · comments
Hi. thanks for this library. if i zoom out image then image is always in center. cant move it to corners for example. can you fix this?
if i change this:
MotionEvent.ACTION_MOVE -> if (state == State.DRAG) {
val deltaX = curr.x - last.x
val deltaY = curr.y - last.y
val fixTransX = getFixDragTrans(deltaX, viewWidth.toFloat(), imageWidth)
val fixTransY = getFixDragTrans(deltaY, viewHeight.toFloat(), imageHeight)
touchMatrix!!.postTranslate(fixTransX, fixTransY)
fixTrans()
last[curr.x] = curr.y
}
to this:
MotionEvent.ACTION_MOVE -> if (state == State.DRAG) {
val deltaX = curr.x - last.x
val deltaY = curr.y - last.y
touchMatrix!!.postTranslate(deltaX, deltaY )
last[curr.x] = curr.y
}
its work but when i save image nothing change.
You want to have it, maybe others don't. That's why it needs an attribute to choose.
Independent of this, if there is a pull request, I'll approve it immediate
thanks. i used this code and its work good now:
MotionEvent.ACTION_MOVE -> if (state == State.DRAG) {
val deltaX = curr.x - last.x
val deltaY = curr.y - last.y
touchMatrix!!.postTranslate(deltaX, deltaY )
fixTrans()
last[curr.x] = curr.y
}
I made a pull request out of your suggestion #304
To be honest, I don't get the point, what's now better with your suggestion. This is the master branch
corner-zoom.mp4
Please can you demonstrate your improvement ?
Btw, I made a sceen record in Emulator and converted *.webm to *.mp4 by https://cloudconvert.com/webm-to-mp4
Hi. i used this library inside PhotoEditor library. so before i made any changes i resize image but it was always in center. after i made that change now i can resize image and move it then save it using PhotoEditor library.
This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!
Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.