技术文章 > 旋转字体

旋转字体

2017-12-12 04:45

文档管理软件,文档管理系统,知识管理系统,档案管理系统的技术资料:

TFont *pfont;
TLogFont lf;
Canvas->Font->Name = "Arial";
Canvas->Font->Size = 24;
Canvas->Font->Color = clRed;
pfont = new TFont;
pfont->Assign(Canvas->Font);
::GetObject(pfont->Handle, sizeof(lf), &lf);
lf.lfEscapement = 0;
lf.lfOrientation = 0;
lf.lfHeight = 25;
SetBkMode(Canvas->Handle, TRANSPARENT);
for(int i = 0; i < 9; i++)
{
pfont->Handle = ::CreateFontIndirect(&lf);
Canvas->Font->Assign(pfont);
Canvas->TextOut(Width / 2, Height / 2, "旋转征文字体");
lf.lfEscapement += 450;
lf.lfOrientation += 450;
}