SKEW Code (Solved)

Started by Dualnames, Fri 07/06/2019 03:38:39

Previous topic - Next topic

Dualnames

https://www.google.com/url?q=https://stackoverflow.com/questions/50149907/imagemagick-skew-image-with-4-x-y-coordinates&sa=D&source=hangouts&ust=1559960173965000&usg=AFQjCNG9LfZr89A8zYRZwyZRw3YNPByfPw


I'm trying to do a simple skew, where u take an image adjust its 4 points and the image gets skewed accordingly. Unfortunately, I've been unable to get an algorithm i can work with, anybody have any ideas?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

tzachs

Inkscape has a "skew" feature, I think their code for that is here, if that helps: https://gitlab.com/inkscape/inkscape/blob/master/src/ui/tool/transform-handle-set.cpp#L510

Dualnames

It's actually projective transformation that I'm trying to accomplish, but I can't seem to be able to find a usable code.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

eri0o

#3
do you need to do this on every frame or only once in a while? I think this can be accomplished with matrices and get pixel, draw pixel, but won't be fast.

I would implement this math: http://www.senocular.com/flash/tutorials/transformmatrix/


Dualnames

Omg, yes, thank you Khris!!
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

SMF spam blocked by CleanTalk