I have an image and I want to be able to draw it normally but change a few coordinates of either the top-left, top-right, or bottom-left, and bottom-right of the image. I know I can change the color of the edges by drawMod() but I couldn't think of any way to do what I want to do. Is that possible yet or ever? Coolio. Thanks.
You mean you want to transform the image to a nonrectangular shape (e.g. a diamond)? There is the Image#draw_as_quad function in Ruby which is used in the same way as Window#draw_quad. In C++, it is perhaps a bit harder to discover:
Neither of the three functions I mentioned is particularly pretty to use, they're meant as building blocks, so feel free to write a wrapper for your specific problem :)
I thought about using the draw method in ImageData, but I saw it was pure virtual so I assumed it wouldn't actually draw anything. Awesome. I can continue with my evil schemes.
Another quick question, how are the quads drawn? More specifically, what is the order of vertices in which the quad is drawn?
Wherever applicable, you can pass either clockwise coordinates (TL, TR, BR, BL) or "reading order" coordinates (TL, TR, BL, BR).
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill