Thread: D3DXMatrixTransformation2D function

  1. #1
    Registered User
    Join Date
    May 2013

    D3DXMatrixTransformation2D function

    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.

  2. #2
    Registered User
    Join Date
    May 2013
    Nevermind, I found the information I needed.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Function Prototype, Function Call, and Function definition
    By dmcarpenter in forum C Programming
    Replies: 9
    Last Post: 04-09-2013, 03:29 AM
  2. Replies: 13
    Last Post: 03-20-2012, 08:29 AM
  3. Print function: sending a function.. through a function?
    By scarlet00014 in forum C Programming
    Replies: 3
    Last Post: 11-05-2008, 05:03 PM
  4. Replies: 14
    Last Post: 03-02-2008, 01:27 PM
  5. Replies: 9
    Last Post: 01-02-2007, 04:22 PM