本文整理汇总了C++中CFont::DescentInPixels方法的典型用法代码示例。如果您正苦于以下问题:C++ CFont::DescentInPixels方法的具体用法?C++ CFont::DescentInPixels怎么用?C++ CFont::DescentInPixels使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFont
的用法示例。
在下文中一共展示了CFont::DescentInPixels方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NextAnimFrameL
//.........这里部分代码省略.........
}
gc.SetPenColor(TRgb(255,0,0));
gc.SetPenSize(TSize(20,20));
gc.DrawPolyLine(mypoints);
gc.SetPenColor(TRgb(0,255,0));
gc.SetPenSize(TSize(15,15));
gc.DrawPolyLine(pointList, KNumPoints);
gc.SetPenColor(TRgb(255,255,0));
gc.SetPenSize(TSize(10,10));
gc.DrawPolygon(mypoints);
gc.SetPenColor(TRgb(0,0,255));
gc.SetPenSize(TSize(5,5));
gc.DrawPolygon(pointList, KNumPoints);
CleanupStack::PopAndDestroy(); // mypoints
break;
}
case 7: // Draw texts
{
gc.UseFont(iFont);
gc.SetDrawMode(CGraphicsContext::EDrawModePEN);
gc.SetPenStyle(CGraphicsContext::ESolidPen);
gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
TInt h = rect.Height() / 3;
TInt y = rect.iTl.iY;
TRect tinyBox(rect);
tinyBox.SetHeight(h);
TInt fontDescent=iFont->DescentInPixels();
gc.SetBrushColor(TRgb(0, 0, 255)); // blue
gc.SetPenColor(TRgb(0,255,0)); // green
gc.DrawText(_L("Ilves"), tinyBox.iTl+TPoint(0, fontDescent));
tinyBox.Move(0,h);
TInt posY = tinyBox.Height()-fontDescent;
gc.SetPenColor(TRgb(255,0,0));
gc.DrawText(_L("Tappara"), tinyBox, posY);
gc.SetPenColor(TRgb(0,255,0)); // green
gc.DrawTextVertical(_L("Ilves"), tinyBox.iTl+TPoint(fontDescent, 0 ), ETrue);
tinyBox.Move(0,h);
posY = tinyBox.Height()-fontDescent;
gc.SetPenColor(TRgb(255,0,0));
gc.DrawTextVertical(_L("Tappara"), tinyBox, posY, ETrue);
break;
}
case 8: // Draw bitmaps
{
TPoint pos(rect.iTl);
gc.BitBlt(pos, iPictureBm);
pos = TPoint(rect.iTl.iX + rect.Width()/3, rect.iTl.iY);
gc.BitBlt(pos, iPictureBm, TRect(iPictureBm->SizeInPixels()));
pos = TPoint(rect.iTl.iX + rect.Width()*2/3, rect.iTl.iY);
gc.BitBltMasked(pos, iPictureBm, TRect(iPictureBm->SizeInPixels()), iMaskBm, EFalse);