コード例 #1
0
ファイル: Line1Tool.cs プロジェクト: swstwix/Paint2
 public void Rotate(int x, int y)
 {
     x0 = RotateHelper.RotateX(x0, y0, x, y);
     y0 = RotateHelper.RotateY(x0, y0, x, y);
     x1 = RotateHelper.RotateX(x1, y1, x, y);
     y1 = RotateHelper.RotateY(x1, y1, x, y);
 }
コード例 #2
0
ファイル: Class1.cs プロジェクト: swstwix/Paint2
        public void RotateCorrect1()
        {
            int x  = 0;
            int y  = 0;
            int x0 = 30;
            int y0 = 30;

            Assert.AreEqual(60, RotateHelper.RotateX(x, y, x0, y0));
            Assert.AreEqual(0, RotateHelper.RotateY(x, y, x0, y0));
        }
コード例 #3
0
        public void Rotate(int x, int y)
        {
            var newx0 = RotateHelper.RotateX(x0, y0, x, y);
            var newy0 = RotateHelper.RotateY(x0, y0, x, y);

            x0         = newx0;
            y0         = newy0;
            afterClick = true;
            list       = null;
            afterMove  = true;
        }
コード例 #4
0
ファイル: Line2Tool.cs プロジェクト: swstwix/Paint2
        public void Rotate(int x, int y)
        {
            var newx0 = RotateHelper.RotateX(x0, y0, x, y);
            var newy0 = RotateHelper.RotateY(x0, y0, x, y);
            var newx1 = RotateHelper.RotateX(x1, y1, x, y);
            var newy1 = RotateHelper.RotateY(x1, y1, x, y);

            x0 = newx0;
            x1 = newx1;
            y0 = newy0;
            y1 = newy1;
        }
コード例 #5
0
ファイル: EllipseTool.cs プロジェクト: swstwix/Paint2
 public void Rotate(int x, int y)
 {
     this.x = RotateHelper.RotateX(this.x, this.y, x, y);
     this.y = RotateHelper.RotateY(this.x, this.y, x, y);
 }