Click to See Complete Forum and Search --> : Sequential Position of Pixels


Arkanos
June 9th, 2006, 09:24 AM
Hi all, I've written a program using DirectX, on runtime I can see some text on the "GUI", the text is compsed by random words.

I can set the Char Size, but when:
- I enlarge it I see the words placed one upon another;
- I reduce it I see the words placed too many far away.

I don't know what can I do to place the words well spaced out.
I need a big help!!

** Look at the attachment **

Here's an example of the code:
// Main.cpp

testvar->SetCharSize(30); // Set the size


// Test.cpp

Test::Test(int x, int y)
{
this->counter1->SetPosition(x,y);

this->counter2->SetPosition(x+12,y);
//..........
//..........
}
Instead of (x+12) I want to place the counter2 on x+(position after the counter1 considering the CharSize that could be variable).

P.S.: in my program I use D3DX and vertex buffer!