public static void AddPngImageResource(this ResourceLoader loader, string key, ImagingFactory factory, string filePath) => loader.AddResource(key, new PngImageResource(factory, filePath));
public static void DrawBitmap(this RenderTarget target, ResourceLoader loader, string key, RawRectangleF rectangle, float opacity = 1, BitmapInterpolationMode bitmapInterpolationMode = BitmapInterpolationMode.Linear) => target.DrawBitmap(loader.Get <ImageResource>(key).Image, rectangle, opacity, bitmapInterpolationMode);
public static void AddSolidColorBrushResource(this ResourceLoader loader, string key, RawColor4 color) => loader.AddResource(key, new SolidColorBrushResource(color));