Example #1
0
        public static SpriteAtlasResource AddSpriteAtlas(this ResourceLoader loader, string key, ImageResource imageResource)
        {
            var resource = new SpriteAtlasResource(imageResource);

            loader.AddResource(key, resource);
            return(resource);
        }
Example #2
0
        public static SpriteAtlasResource AddSpriteAtlas(this ResourceLoader loader, string key, ImagingFactory factory, string path)
        {
            var resource = new SpriteAtlasResource(new PngImageResource(factory, path));

            loader.AddResource(key, resource);
            return(resource);
        }
Example #3
0
 public static void AddPngImageSprite(this ResourceLoader loader, string key, ImagingFactory factory, string path)
 => loader.AddResource(key, new SpriteResource(new PngImageResource(factory, path)));
Example #4
0
 public static void AddSprite(this ResourceLoader loader, string key, ImageResource imageResource)
 => loader.AddResource(key, new SpriteResource(imageResource));
Example #5
0
 public static void AddPngImageResource(this ResourceLoader loader, string key, ImagingFactory factory, string filePath)
 => loader.AddResource(key, new PngImageResource(factory, filePath));
Example #6
0
 public static void AddSolidColorBrushResource(this ResourceLoader loader, string key, RawColor4 color)
 => loader.AddResource(key, new SolidColorBrushResource(color));