コード例 #1
0
        public ActionResult Translation(string button)
        {
            DrawContainer dc = this.GetCmp <DrawContainer>("Draw1");

            dc.GetSprite("Sprite1").SetAttributes(new Sprite {
                TranslationX = -100, TranslationY = -100
            });
            dc.RenderFrame();

            return(this.Direct());
        }
コード例 #2
0
        public ActionResult Scaling(string button)
        {
            DrawContainer dc = this.GetCmp <DrawContainer>("Draw1");

            dc.GetSprite("Sprite1").SetAttributes(new Sprite {
                ScalingX = 2, ScalingY = 2, Duration = 0
            });
            dc.RenderFrame();

            return(this.Direct());
        }
コード例 #3
0
        public ActionResult RotateLeft(string button)
        {
            DrawContainer dc = this.GetCmp <DrawContainer>("Draw1");

            dc.GetSprite("Sprite1").SetAttributes(new Sprite {
                RotationDegrees = -45
            });
            dc.RenderFrame();

            return(this.Direct());
        }
コード例 #4
0
        public ActionResult ChangeColor(string button)
        {
            DrawContainer dc = this.GetCmp <DrawContainer>("Draw1");

            dc.GetSprite("Sprite1").SetAttributes(new Sprite {
                FillStyle = "red"
            });
            dc.RenderFrame();

            return(this.Direct());
        }
コード例 #5
0
        public ActionResult AnimateRect()
        {
            DrawContainer dc = X.GetCmp <DrawContainer>("Draw1");

            dc.GetSprite("rectangles").SetAttributes(new Sprite
            {
                Duration     = 1000,
                TranslationX = 150
            });
            dc.RenderFrame();

            return(this.Direct());
        }
コード例 #6
0
        public ActionResult RotateRight(string button)
        {
            DrawContainer dc = this.GetCmp <DrawContainer>("Draw1");

            dc.GetSprite("Sprite1").SetAttributes(new Sprite
            {
                Duration        = 1000,
                RotationDegrees = 0,
                Easing          = Easing.ElasticIn
            });
            dc.RenderFrame();

            return(this.Direct());
        }