D3DXMatrixTransformation2D function (Windows)
As seen here in this link, this sprite needs the following parameters put in it:
A transformation matrix, a Center to scale from, a scaling rotation value, a center to rotate from, and a rotation value, and a translation point.
I understand the last parameter is expecting a point based off 0,0 of the viewport (The screen). And the first parameter doesn't matter cause it's already done for you.
The second parameter, the center to scale from, is confusing me because I can't find any documentation anywhere on the matter. Is it expecting a point relative to the top left of the view port? or the texture that is being loaded in?
The third parameter, the scaling rotation factor, what does that even mean? how much it rotates by while scaling? huh?
The fourth parameter, the Rotation center, I'm in the same boat on this one as I am on the second Parameter, I have no idea what this point it is expecting from me is relative to. The top left of the sprite or the viewport?
The fourth parameter makes sense at least.
Can someone please help clear all of this up? I'm trying to make a button class where a bounding box is dynamically generated for any sprite size given, and that's proving extremely difficult to do when I don't know if the sprite is being drawn from the center, the top left, the top right or w/e. There's no documentation on how to find the origin point of where sprites are drawn using the Sprite.Draw method.