Giter VIP home page Giter VIP logo

Comments (3)

thuytrinh avatar thuytrinh commented on August 16, 2024

Getters for translateX, translateY, scaleX, and scaleY.

from android-collage-views.

jhalborg avatar jhalborg commented on August 16, 2024

Hey :-)

First of all, thanks for a cool lib!

Second, I have a use case where I need help with this as well. I need to move the stickers in a layout in one view, save the state of them, and redraw them in with the same transformations in another canvas.

I thought saving the TransformInfo object and calling the move() method in the MultiTouchListener with it would do the trick, but apparently not

  • The TransformInfo object is not affected when simply moving the image, only when scaling/rotating.
  • Even if I have scaled and/or rotated an image and therefore have a TransformInfo object to pass to a new instance of MultiTouchListener to call move() with, nothing happens.

Any ideas how to do this? Thanks :-)

EDIT: And there doesn't seem to be any other values for translateX, translateY, scaleX, and scaleY as mentioned in 2014 :-) I'm guessing they have since been moved into the TransformInfo object?

from android-collage-views.

dupuisdavid avatar dupuisdavid commented on August 16, 2024

Hello,

As SwordBearer, I tried to get translate and scale values. I do this job in MotionEvent.ACTION_UP case in onTouch method of MultiTouchListener.
No problem for this.
After moving and scaling my view, I do a first screen capture in order to obtain a perfect image of the view state. Ok, that's done.

In a second time, I restart app and apply previous found values to the view with setTranslateX, setTranslateY, setScaleX and setScaleY. I do a second capture. But what is very strange when comparing the 2 captures is that view position is not exactly corresponding while size is correct.

Any idea ?

Thanks.

David

from android-collage-views.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.