标签:
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); }
【D3D】Direct3D中LPRECT(上左右底)和LPoint(x,y)之前转换
标签:
原文地址:http://www.cnblogs.com/SparkOng/p/4964157.html