ID3DXFont - can the text be rotated?

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
User avatar
ScurvyKnave
Gremlin
Posts: 150
Joined: Mon Oct 10, 2005 5:57 pm
Contact:

ID3DXFont - can the text be rotated?

Post by ScurvyKnave »

Hello all. This is DirectX-related rather than Ogre-related (I personally use Ogre for my own projects, but where I work we use our own in-house engine). I was hoping somebody on these forums with DX experience might know.

I'm using ID3DXFont to draw text on screen, but I need to be able to rotate the text 90 degrees. Does anybody know if this is possible?
User avatar
ScurvyKnave
Gremlin
Posts: 150
Joined: Mon Oct 10, 2005 5:57 pm
Contact:

Post by ScurvyKnave »

The ID3DXFont::DrawText() function declaration looks like this...

Code: Select all

INT DrawText(
  LPD3DXSPRITE pSprite,
  LPCTSTR pString,
  INT Count,
  LPRECT pRect,
  DWORD Format,
  D3DCOLOR Color
);
I've created a D3DXSPRITE and passed it to the function, so that the text gets drawn to the sprite. My thinking was that I would rotate the sprite by setting it's transform matrix. But modifying the sprite seems to only modify the region that the text is drawn to, not the alignment of the actual text :?
User avatar
ScurvyKnave
Gremlin
Posts: 150
Joined: Mon Oct 10, 2005 5:57 pm
Contact:

Post by ScurvyKnave »

Fixed the problem. Sorry for posting a boring technical question amongst all the other riveting economic and political debates :)
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post by nullsquared »

ScurvyKnave wrote:Fixed the problem. Sorry for posting a boring technical question amongst all the other riveting economic and political debates :)
Mind posting the solution, if possible? :)
Post Reply