Hi, first time poster here, be gentle.
When I draw text onto a sprite, some characters gets cropped. You can see for yourself in this screenshot: http://img202.imageshack.us/img202/2895/choppytext.png
The user types on the keyboard and it appears on a "command log". Each line has its own RECT. And each line is drawn in a FOR loop.
As you can see, some characters are "cropped", a vertical line of pixels is sometimes removed.
Someone mentioned to me that the render surface might be smaller then what I need so some pixels gets aliased
code:
D3DXCreateFont(d3ddev,
22,
0,
FW_NORMAL,
0,
false,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS,
ANTIALIASED_QUALITY,
DEFAULT_PITCH | FF_DONTCARE,
L"Arial",
&dxfont);
and:
dxfont->DrawTextA(d3dspt,ary[k],str[k].length(),&textbox[k],DT_LEFT | DT_VCENTER,D3DCOLOR_ARGB(255, 255, 0, 0));
Any clues?
[DX9] DrawTextA() distorting text
ok, apperantly the "client window" size includes boarders and menu, so I would need to add some extra height and width to compensate. and there is a AdjustWindowRectEx to do so. If only tutorials would include this information :)
Quote:Original post by TispeAnd that's one of the many reasons why I hate directxtutorial.com :P
ok, apperantly the "client window" size includes boarders and menu, so I would need to add some extra height and width to compensate. and there is a AdjustWindowRectEx to do so. If only tutorials would include this information :)
The client area is the "internal" window size:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement