D3DSprite.cpp void CD3DSprite::DrawText(CD3DFont *pFont, char *szString, RECT &DesRect, D3DCOLOR Color) { DrawText(pFont, szString, DesRect, DT_TOP|DT_LEFT, Color); } void CD3DSprite::DrawText(CD3DFont *pFont, char *szString, D3DXVECTOR2 &Pos, D3DCOLOR Color) { RECT DesRect; DesRect.left = Pos.x; DesRect.top = Pos.y; DesRect.right = pFont->GetFontArea().right; DesRect.bottom = pFont->GetFontArea().bottom; DrawText(pFont, szString, DesRect, Color); } void CD3DSprite::DrawText(CD3DFont* pFont, char *szString, RECT &DesRect, DWORD AlignFormat, D3DCOLOR Color) { pFont->GetFontHandle()->DrawText(m_pSprite, szString, -1, &DesRect, AlignFormat, Color); }
时间: 2024-10-21 03:59:05