SetWorldTransform Question

This is a discussion on SetWorldTransform Question within the Game Programming forums, part of the General Programming Boards category; If i had a bunch of graphics on the screen at one time and i wanted to use SetWorldTransform to ...

  1. #1
    Call me AirBronto
    Join Date
    Sep 2004
    Location
    Indianapolis, Indiana
    Posts
    195

    SetWorldTransform Question

    If i had a bunch of graphics on the screen at one time and i wanted to use SetWorldTransform to make only one object rotate, would i have to have that object in a seprate DC over the main DC to make only it rotate and not any thing else.

    thanks for the help

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Basically you just need to set the transform then do your rendering then reset the transform. Does that make sense?

    1. Render all of the objects
    2. Set your matrix transform
    3. Render your RECT
    4. Reset matrix transform
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    Call me AirBronto
    Join Date
    Sep 2004
    Location
    Indianapolis, Indiana
    Posts
    195
    MSDN defines SetWorldTransform as "The SetWorldTransform function sets a two-dimensional linear transformation between world space and page space for the specified device context."

    so that to me sounds like it will turn a whole DC and not just individual graphical objects.

    so what is was asking is, will i need a seprate DC just for the rotated object so every thing else will not rotate, or am i missing something about the definition.

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    SetWorldTransform will only transform what you send to it. It will not transform every pixel in the DC.

  5. #5
    Call me AirBronto
    Join Date
    Sep 2004
    Location
    Indianapolis, Indiana
    Posts
    195
    thanks man

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 03:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21