Microsoft.Xna.Framework.Graphics.SpriteEffect.OnApply C# (CSharp) Метод

OnApply() защищенный Метод

Lazily computes derived parameter values immediately before applying the effect.
protected OnApply ( ) : bool
Результат bool
        protected internal override bool OnApply()
        {
            var viewport = GraphicsDevice.Viewport;

            var projection = Matrix.CreateOrthographicOffCenter(0, viewport.Width, viewport.Height, 0, 0, 1);
            var halfPixelOffset = Matrix.CreateTranslation(-0.5f, -0.5f, 0);

            matrixParam.SetValue(halfPixelOffset * projection);

            return false;
        }