using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace Ex02_8
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void Form1_Click(object sender, EventArgs e)
        {
            Graphics myGraphics = this.CreateGraphics();
            myGraphics.Clear(Color.WhiteSmoke);
            myGraphics.SmoothingMode = SmoothingMode.AntiAlias;
            string str = "文字的360度旋转效果";
            for (int i = 0; i < 360; i += 20)
            {
                myGraphics.TranslateTransform(150, 150);
                myGraphics.RotateTransform(i);
                Brush myBrush = Brushes.Red;
                Font myFont = new Font("华文行楷", 15);
                myGraphics.DrawString(str, myFont, myBrush, 0, 0);
                myGraphics.ResetTransform();
            }
        }

        private void Form1_DoubleClick(object sender, EventArgs e)
        {
            this.Close();    //关闭程序
        }
    }
}
