Draw Text Function...

Posts 1–12 of 12 · Page 1 of 1
Draw Text Function...
I was board so I thought I'd release this...

[PHP]
void cDrawText(char *Text, int x, int y, char *FontName, D3DCOLOR FontColor, int FontWidth, int FontHeight, UINT Weight, IDirect3DDevice9* pDevice)
{
ID3DXFont *Font;
D3DXCreateFontA(pDevice, FontHeight, FontWidth, Weight, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE, FontName, &Font);
RECT FontR = {
x,
y,
x+500,
y+30
};
Font->DrawTextA(NULL, Text, -1, &FontR, DT_LEFT | DT_WORDBREAK, FontColor);
}
[/PHP]
This is more complicated then it should be..

And theres like 100 already released
But he actually made this so...
Why the hell would i use this and create the font every time that function is called?
Quote Originally Posted by ac1d_buRn View Post
Why the hell would i use this and create the font every time that function is called?
Because you can?
cause then ppl dont have to do it themselves :?
What's it looks like :S
Noice memory leak.
Quote Originally Posted by mmbob View Post
Noice memory leak.
Yea he did not release it. Yea he can create the font every Frame as much times as he want but the memory leak will LAG LIKE HELL. driving the computer to a halt.
Holy fuck, I have never seen anything liek this. Way to go.
Quote Originally Posted by IcySeal View Post
Holy fuck, I have never seen anything liek this. Way to go.
Thanks! Check your PM's...
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us