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);
}

 

posted on 2015-11-14 12:21  王庆东mas  阅读(304)  评论(0编辑  收藏  举报