I won’t say much nonsense, I will just post the code to you. The specific code is as follows:
The code is as follows:
using System; using ; using ; using ; using ; using .Drawing2D; using ; using ; using ; public partial class WordArt : UserControl//This is a control with the word art{ //Text attributesprivate string _text = "WordArt"; public string Caption { get { return _text; } set { _text = value; } } //Font and sizeprivate Font _WordArtFont = new Font("Songyi",15); public Font WordArtFont { get { return _WordArtFont; } set { _WordArtFont = value; } } //colorprivate Color _WordArtForeColor = ; public Color WordArtForeColor { get { return _WordArtForeColor; } set { _WordArtForeColor = value; } } //The color of the shadowprivate Color _WordArtBackColor = ; public Color WordArtBackColor { set { _WordArtBackColor = value; } get { return _WordArtBackColor; } } //Text output quality: rendering mode and smoothing effectprivate TextRenderingHint _TextRenderingHint = ; public TextRenderingHint WordArtTextRenderingHint { get { return _TextRenderingHint; } set { _TextRenderingHint = value; } } public SmoothingMode _SmoothingMode = ; public SmoothingMode WordArtSmoothingMode { get { return _SmoothingMode; } set { _SmoothingMode = value; } } public WordArt() { InitializeComponent(); } //The form of artistic characters: shadows, reliefs...private WordArtEffectStyle _WordArtEffect=;//Projection is the default form;public WordArtEffectStyle WordArtEffect { get { return _WordArtEffect; } set { _WordArtEffect = value; } } protected override void OnPaint(PaintEventArgs e) { (e); Graphics g = (); Brush backBrush=new SolidBrush(); Brush foreBrush=new SolidBrush(); SizeF size = (, ); Single posX = ( - Convert.ToInt16()) / 2; Single posY = ( - Convert.ToInt16()) / 2; switch () { case ://Projection effect//Set text output quality = ; = ; Matrix matrix = new Matrix(); //projection(-1.5f, 0.0f); //Zoom(1, 0.5f); //Platform(120, 75); //Convert the coordinates of the drawing plane = matrix;
The code ends here, I hope it will be helpful to everyone!