1

Closed

Return value of D3DXFont's DrawText is misinterpreted

description

According to the DirectX SDK, the return value of ID3DXFont::DrawText and ID3DXFont10::DrawText is:
 
"If the function succeeds, the return value is the height of the text in logical units. If DT_VCENTER or DT_BOTTOM is specified, the return value is the offset from pRect (top to the bottom) of the drawn text. If the function fails, the return value is zero."
 
The DX10 Font wrapper code treats the return value as an arbitrary HRESULT instead of the true meaning, which in most cases results in an exception being thrown.
Closed Sep 30, 2007 at 4:46 PM by Demirug
Fixed with change set 27318. Thank you for reporting

comments