2

I would like to free transform an Android image. I have gotten comfortable using a matrix to skew a bitmap see below (just imagine the red shape is replaced with a bitmap or jpeg image):

enter image description here

What I want to do is be able to free transform the image. So for example only move 1 corner and have the other corners stay in the same location. What is an effective way of doing that?

Is there some sort of matrix math that I would need to do to do this?

halfer
  • 19,824
  • 17
  • 99
  • 186
ControlAltDelete
  • 3,576
  • 5
  • 32
  • 50

1 Answers1

3

setPolyToPoly not applied

matrix.setpolytopoly addresses this issue. Above is a link that I found to it.

Community
  • 1
  • 1
ControlAltDelete
  • 3,576
  • 5
  • 32
  • 50
  • Just for the sake of anyone googling here, if you have to do this in iOS, thank goodness there's a cut and paste code solution here for modern swift: http://stackoverflow.com/a/39981054/294884 unfortunately iOS has no such handy "poly to poly" method. – Fattie Oct 18 '16 at 19:35