Beispiel #1
0
        public void RotateBanhXe(Graphics g)
        {
            banhTrc.FillColor(g, Color.White);
            banhSau.FillColor(g, Color.White);

            truc1.B = Transformations.Quay(truc1.B, truc1.A, 30);
            truc2.B = Transformations.Quay(truc2.B, truc1.A, 30);
            truc3.B = Transformations.Quay(truc3.B, truc1.A, 30);

            truc4.B = Transformations.Quay(truc4.B, truc4.A, 30);
            truc5.B = Transformations.Quay(truc5.B, truc4.A, 30);
            truc6.B = Transformations.Quay(truc6.B, truc4.A, 30);

            truc1.Draw(g);
            truc2.Draw(g);
            truc3.Draw(g);
            truc4.Draw(g);
            truc5.Draw(g);
            truc6.Draw(g);

            if (chopDen)
            {
                this.fillColorRight(g, Color.Red);
                this.fillColorLeft(g, Color.Blue);

                chopDen = false;
            }
            else
            {
                this.fillColorRight(g, Color.Blue);
                this.fillColorLeft(g, Color.Red);

                chopDen = true;
            }
        }
Beispiel #2
0
        public void Quay()
        {
            trucBanh1.A = Transformations.Quay(trucBanh1.A, banh1.Point, 10);
            trucBanh1.B = Transformations.Quay(trucBanh1.B, banh1.Point, 10);

            trucBanh2.A = Transformations.Quay(trucBanh2.A, banh2.Point, 10);
            trucBanh2.B = Transformations.Quay(trucBanh2.B, banh2.Point, 10);
        }
Beispiel #3
0
        public void run()
        {
            earth.DeleteCus(g, Color.Black);
            earth.Point = Transformations.Quay(earth.Point, tam, -5);
            truc.DeleteCus(g, Color.Black);
            truc.A = Transformations.Quay(truc.A, tam, -5);
            truc.B = Transformations.Quay(truc.B, tam, -5);
            earth.Draw(g);

            truc.A = Transformations.Quay(truc.A, earth.Point, 10);
            truc.B = Transformations.Quay(truc.B, earth.Point, 10);
            truc.Draw(g);

            quydao.Draw(g);
        }