23 lines
639 B
C++
23 lines
639 B
C++
class KTextFormator
|
|
{
|
|
typedef enum { MaxCharNo = 256 };
|
|
|
|
double m_fCharWidth[MaxCharNo];
|
|
double m_fHeight;
|
|
double m_fLinespace;
|
|
|
|
public:
|
|
|
|
BOOL SetupPixel(HDC hDC, HFONT hFont, double pixelsize);
|
|
BOOL Setup(HDC hDC, HFONT hFont, double pointsize);
|
|
|
|
double GetLinespace(void) const
|
|
{
|
|
return m_fLinespace;
|
|
}
|
|
BOOL GetTextExtent(HDC hdc, LPCTSTR pString, int cbString, double & width, double & height);
|
|
BOOL TextOutSpacing(HDC hDC, int x, int y, LPCTSTR pString, int nCount, double dSpacing);
|
|
BOOL TextOutSize(HDC hDC, int x, int y, LPCTSTR pString, int nCount,
|
|
double dWidth, double dHeight);
|
|
};
|