Exemplo n.º 1
0
        static Matrix3x2 GetDisplayTransform(ICanvasAnimatedControl canvas)
        {
            var outputSize = canvas.Size.ToVector2();
            var sourceSize = new Vector2(canvas.ConvertPixelsToDips(simulationW), canvas.ConvertPixelsToDips(simulationH));

            return(Utils.GetDisplayTransform(outputSize, sourceSize));
        }
Exemplo n.º 2
0
        private Matrix3x2 GetDisplayTransform(ICanvasAnimatedControl canvas)
        {
            // A transform matrix scales up the game image rendertarget and moves
            // it to the right part of the screen. This uses nearest neighbor filtering
            // to avoid unwanted blurring of the cell shapes.
            var outputSize = canvas.Size.ToVector2();
            var sourceSize = new Vector2(canvas.ConvertPixelsToDips(gameWidth), canvas.ConvertPixelsToDips(gameHeight));

            return(GetDisplayTransform(outputSize, sourceSize));
        }
Exemplo n.º 3
0
        static Matrix3x2 GetDisplayTransform(ICanvasAnimatedControl canvas)
        {
            var outputSize = canvas.Size.ToVector2();
            var sourceSize = new Vector2(canvas.ConvertPixelsToDips(simulationW), canvas.ConvertPixelsToDips(simulationH));

            return Utils.GetDisplayTransform(outputSize, sourceSize);
        }