using System.Drawing.Text;
using System.Drawing.Printing;
using System.Drawing.Drawing2D;
private void Form1_Paint(object sender, PaintEventArgs e)
{
//投影文字
Graphics g = this.CreateGraphics();
//设置文本输出质量
g.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
g.SmoothingMode = SmoothingMode.AntiAlias;
Font newFont = new Font("Times New Roman", 48);
Matrix matrix = new Matrix();
//投射
matrix.Shear(-1.5f, 0.0f);
//缩放
matrix.Scale(1, 0.5f);
//平移
matrix.Translate(130, 88);
//对绘图平面实施坐标变换、、
g.Transform = matrix;
SolidBrush grayBrush = new SolidBrush(Color.Gray);
SolidBrush colorBrush = new SolidBrush(Color.BlueViolet);
string text = "MINGRISOFT";
//绘制阴影
g.DrawString(text, newFont, grayBrush, new PointF(0, 30));
g.ResetTransform();
//绘制前景
g.DrawString(text, newFont, colorBrush, new PointF(0, 30));
}
以投影效果显示文字
原创
©著作权归作者所有:来自51CTO博客作者踏行天下的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
有趣的CSS - 文字加载动画效果
用 css 实现多字符模拟加载动画效果。
css 加载动画 交互 ux 动效 -
投影仪不能显示桌面图标(文字)
在把笔记本借到投影仪上时,桌面上的图标在投影仪上死活不显示,投影仪只显示笔记本桌面背景,有部分原因如下,
桌面图标 Windows 重新启动 -
VB实现文字“闪入”显示的特殊效果
作者
vb animation function string basic