#ifndef __CVXTEXT_H__ #define __CVXTEXT_H__ #include "HGImgProc.h" #include #include class CvxText { public: CvxText(); ~CvxText(); bool Create(const HGChar *fontPath); bool Destroy(); bool MeasureString(const HGChar *text, HGInt x, HGInt y, HGUInt size, HGBool bold, HGBool underline, HGBool italic, HGBool strikeout, HGRect *pos); bool DrawString(HGImage image, const HGChar *text, HGInt x, HGInt y, HGColor color, HGUInt size, HGBool bold, HGBool underline, HGBool italic, HGBool strikeout); private: void MeasureChar(HGUInt wc, HGUInt size, HGBool bold, HGBool underline, HGBool italic, HGBool strikeout, HGUInt &width, HGUInt &height); void DrawChar(HGImage image, HGUInt wc, HGInt x, HGInt y, HGColor color, HGUInt size, HGBool bold, HGBool italic, HGBool angle, HGBool underline, HGUInt &width, HGUInt &height); private: FT_Library m_library; FT_Face m_face; }; #endif /* __CVXTEXT_H__ */