本文整理汇总了C#中System.Drawing.Graphics.DrawTextWithShadow方法的典型用法代码示例。如果您正苦于以下问题:C# Graphics.DrawTextWithShadow方法的具体用法?C# Graphics.DrawTextWithShadow怎么用?C# Graphics.DrawTextWithShadow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Graphics
的用法示例。
在下文中一共展示了Graphics.DrawTextWithShadow方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawInfoText
private void DrawInfoText(Graphics g, string text, Rectangle rect, Font font, int padding,
Brush backgroundBrush, Pen outerBorderPen, Pen innerBorderPen, Brush textBrush, Brush textShadowBrush)
{
g.FillRectangle(backgroundBrush, rect.Offset(-2));
g.DrawRectangleProper(innerBorderPen, rect.Offset(-1));
g.DrawRectangleProper(outerBorderPen, rect);
g.DrawTextWithShadow(text, rect.Offset(-padding).Location, font, textBrush, textShadowBrush);
}
示例2: DrawInfoText
private void DrawInfoText(Graphics g, string text, Rectangle rect, int padding)
{
g.FillRectangle(textBackgroundBrush, rect.Offset(-2));
g.DrawRectangleProper(textBackgroundPenBlack, rect.Offset(-1));
g.DrawRectangleProper(textBackgroundPenWhite, rect);
g.DrawTextWithShadow(text, rect.Offset(-padding).Location, infoFont, Brushes.White, Brushes.Black);
}
示例3: DrawFPS
private void DrawFPS(Graphics g, int offset)
{
Rectangle screenBounds = CaptureHelpers.GetActiveScreenBounds0Based();
g.DrawTextWithShadow(FPS.ToString(), screenBounds.Location.Add(offset), infoFontBig, Brushes.White, Brushes.Black, new Point(0, 1));
}