zoukankan      html  css  js  c++  java
  • MSDN实例之二:Matrix.Scale

    这个实例演示了Matrix.Scale()方法,这个方法可以使坐标系放大,放大后的效果如下:
    tr 
     
     
     
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Drawing.Drawing2D;
    namespace Scale
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void Form1_Paint(object sender, PaintEventArgs e)
            {
                Pen myPen = new Pen(Color.Blue, 1);
                Pen myPen2 = new Pen(Color.Red, 1);
    
                // Draw the rectangle to the screen before applying the
                // transform.
                e.Graphics.DrawRectangle(myPen, 30, 30, 50, 50);
    
                // Create a matrix and scale it.
                Matrix myMatrix = new Matrix();
                myMatrix.Scale(4, 4, MatrixOrder.Append);
    
                // Draw the rectangle to the screen again after applying the
                // transform.
                e.Graphics.Transform = myMatrix;
                e.Graphics.DrawRectangle(myPen2, 30, 30, 50, 50);
            }
        }
    }
  • 相关阅读:
    ER图
    uml图
    第一个迭代任务的制作
    软件测试
    实训记录
    UML系列图——ER图
    UML系列图——用例图
    第一个迭代任务进度
    第一个迭代任务
    需求分析——WBS
  • 原文地址:https://www.cnblogs.com/hbhbice/p/1724861.html
Copyright © 2011-2022 走看看