red orange yellow green blue

I have highlighters!

A very simple get rectangle function for use with bitmap fonts.


RECT CBitmapFont::GetRect(int nIndex, int nCellW, int nCellH, int nCol)
{
 RECT rCell;

 rCell.left =   (nIndex % nCol) * nCellW;
 rCell.top =    (nIndex / nCol) * nCellH;
 rCell.right =  (long)(rCell.left + nCellW);
 rCell.bottom = (long)(rCell.top + nCellH);

 return rCell;
}

Comments are closed.