1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
void AngleTextOut(HDC DC, int Angle, int X, int Y, char *Str){
TLogFont lf;
HFONT newFont, oldFont;
memset(&lf,0,sizeof(lf));
lf.lfHeight=13;
lf.lfWidth=0;
strcpy(lf.lfFaceName,"Tahoma");
lf.lfEscapement = Angle*10;
lf.lfItalic = 0;
lf.lfStrikeOut = 0;
lf.lfUnderline =0;
lf.lfWeight =0;
lf.lfOrientation = lf.lfEscapement;
lf.lfPitchAndFamily = FIXED_PITCH | FF_DONTCARE;
lf.lfOutPrecision = OUT_TT_PRECIS;
lf.lfQuality = PROOF_QUALITY;
newFont = CreateFontIndirect(&lf);
oldFont = SelectObject(DC, newFont);
SetBkMode(DC, TRANSPARENT);
TextOut(DC,X,Y,Str,StrLen(Str));
SelectObject(DC, oldFont);
DeleteObject(newFont);
} |
Partager