Created
June 2, 2019 21:41
-
-
Save christianb/2bb5d28e7ff711bb6490c9cf089cb98c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val matrix = Matrix() | |
val srcIndex = 0 | |
val dstIndex = 0 | |
val pointCount = 4 // or any other number of points you wanna transform | |
/** | |
* Set the matrix such that the specified src points would map to the specified dst points. The | |
* "points" are represented as an array of floats, order [x0, y0, x1, y1, ...], where each | |
* "point" is 2 float values. | |
*/ | |
matrix.setPolyToPoly(srcFloatArray, srcIndex, dstFloatArray, dstIndex, pointCount) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment