Page 1 of 1
ID3DXFont - can the text be rotated?
Posted: Thu Apr 10, 2008 9:14 am
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?
Posted: Thu Apr 10, 2008 11:00 am
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

Posted: Sun Apr 13, 2008 8:36 am
by ScurvyKnave
Fixed the problem. Sorry for posting a boring technical question amongst all the other riveting economic and political debates

Posted: Sun Apr 13, 2008 1:37 pm
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?
