IconAtlas

public sealed class IconAtlas : IDisposable
A class which caches icons as bitmaps on the disk.

Constructors

IconAtlas

#
public IconAtlas(string continent, Size size)
continent (string)
size (Size)

Properties

Continent

#
public string Continent { get; }
Gets the continent this atlas refers to. The continent uniquely identifies a set of cached icons.

Folder

#
public string Folder { get; }
Gets the folder in which images inside this atlas are cached.

Size

#
public Size Size { get; }
Gets the size of the cached icons.

Methods

Clear

#
public void Clear()
Clear the disk and the memory cache.

Dispose

#
public void Dispose()

GetOrCreate

#
public Bitmap GetOrCreate(string name, IIcon icon)
Gets the cached version of an icon, or render the supplied icon to a bitmap and cache it.
name (string)Name of cached icon.
icon (IIcon)Fallback icon. If the icon is null, this method *always* returns null.
Cached image or created image.

LoadFromDisk

#
public void LoadFromDisk()
Load this atlas from the cache folder. You should only need to call this method if you have reason to believe the contents of the folder were modified through some mechanism other than this atlas instance.

SaveToDisk

#
public void SaveToDisk()
Save this atlas to the cache folder. You should only need to call this method if you have reason to believe the contents of the folder were modified through some mechanism other than this atlas instance.