|
Post by NeX on Oct 12, 2015 11:21:47 GMT -8
hi there,
i am flipping a jpg by 180 degrees using the cmd_translate function to move to the center and flip around the center. i use the save and restore content command to clear the flip from future functions but then i have a second jpg that i am rotating around its center. it has a different size so the cmd_translate function is different, but the second image does not show. if i remove the original rotate call then the second image comes up.
it seems almost like the save and restore commands are not working fully as far as the translate and rotate commands are concerned.
any help? thanks
|
|
|
Post by NeX on Oct 13, 2015 0:36:35 GMT -8
I think i have solved it,
It seems like the save and restore functions don't cover rotation, so after rotating something around its center, you need to repeat the command to set the bitmap matrix back to how it was before before displaying the next bitmap.
|
|
|
Post by jamesbowman on Oct 13, 2015 10:34:01 GMT -8
Yes, doing
GD.cmd_loadidentity(); is essential - it resets the transform matrix back to its starting value.
|
|
|
Post by NeX on Oct 14, 2015 0:19:12 GMT -8
yep that did the job, thanks!
|
|