public sealed class CmyCubeCache : LazyTextureCache<decimal>
Class for caching CMY colour space sections.

Constructors

CmyCubeCache

#
public CmyCubeCache(int lowQuality, int highQuality, int padding)
Create a new CMY section cache.
lowQuality (int)Low quality resolution.
highQuality (int)High quality resolution.
padding (int)Pixel padding.

Properties

AutoCancelRendering

public bool AutoCancelRendering { get; set; }
Gets or sets whether high quality texture rendering will be cancelled automatically if a new texture is requested.
inherited fromLazyTextureCache<TKey>

CacheLimit

public int CacheLimit { get; set; }
Gets or sets the cache size limit. If the number of cached textures exceeds this limit the cache will be emptied entirely. Note that changes to the cache limit won't be taken into consideration until the next texture is scheduled for caching.
inherited fromLazyTextureCache<TKey>

Count

public int Count { get; }
Gets the total number of cached textures. This includes textures of all quality levels.
inherited fromLazyTextureCache<TKey>

Filter

public NamedPalette Filter { get; set; }
Gets or sets the rounding table to use when making textures.
inherited fromLazyTextureCache<TKey>

Padding

public int Padding { get; }
Gets the padding (in pixels) for all textures.
inherited fromLazyTextureCache<TKey>

PrettySize

public Size PrettySize { get; }
Gets the resolution for high quality, fine textures.
inherited fromLazyTextureCache<TKey>

QuickSize

public Size QuickSize { get; }
Gets the resolution for low quality, coarse textures.
inherited fromLazyTextureCache<TKey>

Indexers

this[]

public IMultiResolutionTexture this[TKey key, TextureCacheAccess access = TextureCacheAccess.QuickNowPrettyLater] { get; }
Gets the texture associated with the given key. If the requested texture hasn't been created yet, it will be rendered in low resolution in the caller thread and a high resolution rendering will commence in a background thread.
inherited fromLazyTextureCache<TKey>
key (TKey)Key to retrieve.
access (TextureCacheAccess = TextureCacheAccess.QuickNowPrettyLater)Cache access.
Cached texture.

Methods

Clear

public void Clear()
Clear all cached textures.
inherited fromLazyTextureCache<TKey>

CreateTexture

#
protected override Bitmap CreateTexture(Size size, int padding, decimal key, CancellationToken token)
Creates a texture with the specified properties.
size (Size)
padding (int)
key (decimal)
token (CancellationToken)

ProcessKey

#
protected override decimal ProcessKey(decimal key)
Override this method if you wish to perform some operation to key values such as rounding or limiting. The base implementation returns the input key.
key (decimal)Key to process.
Processed key.