Ejemplo n.º 1
0
        public static SpriteAtlasResource AddSpriteAtlas(this ResourceLoader loader, string key, ImageResource imageResource)
        {
            var resource = new SpriteAtlasResource(imageResource);

            loader.AddResource(key, resource);
            return(resource);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public static void AddPngImageSprite(this ResourceLoader loader, string key, ImagingFactory factory, string path)
 => loader.AddResource(key, new SpriteResource(new PngImageResource(factory, path)));
Ejemplo n.º 4
0
 public static void AddSprite(this ResourceLoader loader, string key, ImageResource imageResource)
 => loader.AddResource(key, new SpriteResource(imageResource));
Ejemplo n.º 5
0
 public static void AddPngImageResource(this ResourceLoader loader, string key, ImagingFactory factory, string filePath)
 => loader.AddResource(key, new PngImageResource(factory, filePath));
Ejemplo n.º 6
0
 public static void AddSolidColorBrushResource(this ResourceLoader loader, string key, RawColor4 color)
 => loader.AddResource(key, new SolidColorBrushResource(color));