资 源 简 介
C# 将多个文字图形图像组合成复合图形,一个组合文字及图像的实例。基于WPF技术实现,可作为一个C#学习WPF图像处理的简单范例。C# 将多个文字图形图像组合成复合图形:
DrawingGroup MyGroup = new DrawingGroup();
RadialGradientBrush MyRadialGradientBrush = new RadialGradientBrush();
MyRadialGradientBrush.Freeze();
FontStyle MyStyle = FontStyles.Normal;
FontWeight MyWeight = FontWeights.Medium;
MyWeight = FontWeights.Bold;
MyStyle = FontStyles.Italic;
string MyText = "Visual C++ 2017源码素材网实例精粹罗斌编著";
var MyFont = new FontFamily("宋体");
FormattedText MyFormattedText = new FormattedText(MyText,
System.Globalization.CultureInfo.GetCultureInfo(86),
FlowDirection.RightToLeft,
new Typeface(MyFont, MyStyle, MyWeight, FontStretches.Normal),
FontSize, MyRadialGradientBrush);
Pen MyPen = new Pen(Brushes.Black, 2);
MyPen.Freeze();
……
更多源代码敬请下载本源码。运行截图如下图所示。