Пример #1
0
        public SpriteImage(string fileName, Color alfaColor)
        {
            ImageInformation imageInfo = TextureLoader.ImageInformationFromFile(fileName);

            this.size = new Size(imageInfo.Width, imageInfo.Height);

            this.texture = TextureLoader.FromFile(
                Game.renderDevice, fileName,
                0, 0, 1,
                Usage.None, Format.Unknown, Pool.Managed,
                Filter.None, Filter.None, alfaColor.ToArgb()
            );
        }