コード例 #1
0
        public static StandardImageBackgroundGDI GetStandardBackgroundDrawer(PointF Movement, float fade = 0.4f)
        {
            ImageAttributes useBGAttributes = new ImageAttributes();

            useBGAttributes.SetColorMatrix(ColorMatrices.GetFader(fade));
            var sib = new StandardImageBackgroundGDI(new StandardImageBackgroundDrawGDICapsule()
            {
                _BackgroundImage = TetrisGame.StandardTiledTetrisBackground, theAttributes = useBGAttributes, Movement = Movement
            });

            return(sib);
        }
コード例 #2
0
        public static StandardImageBackgroundGDI GetStandardBackgroundDrawer(float fade = 0.4f)
        {
            ImageAttributes useBGAttributes = new ImageAttributes();

            useBGAttributes.SetColorMatrix(ColorMatrices.GetFader(fade));
            double xpoint = 1 + TetrisGame.rgen.NextDouble() * 2;
            double ypoint = 1 + TetrisGame.rgen.NextDouble() * 2;
            var    sib    = new StandardImageBackgroundGDI(new StandardImageBackgroundDrawGDICapsule()
            {
                _BackgroundImage = TetrisGame.StandardTiledTetrisBackground, theAttributes = useBGAttributes, Movement = new PointF((float)xpoint, (float)ypoint)
            });

            return(sib);
        }