Class DrawingTextCache
- Namespace
- SixLabors.ImageSharp.Drawing.Processing
- Assembly
- SixLabors.ImageSharp.Drawing.dll
Stores reusable text drawing data shared by one or more drawing canvases.
public sealed class DrawingTextCache
- Inheritance
-
DrawingTextCache
- Inherited Members
Remarks
This class is thread-safe. Concurrent drawing operations must use separate canvas instances.
Constructors
DrawingTextCache()
Initializes a new instance of the DrawingTextCache class.
public DrawingTextCache()
DrawingTextCache(int)
Initializes a new instance of the DrawingTextCache class.
public DrawingTextCache(int capacity)
Parameters
capacityintThe maximum number of text cache entries.
Fields
DefaultCapacity
The default maximum number of text cache entries.
public const int DefaultCapacity = 16384
Field Value
Properties
Capacity
Gets the maximum number of glyph cache entries. The smaller run-path cache capacity is derived from this value.
public int Capacity { get; }
Property Value
Count
Gets the number of glyph cache entries. Run-path entries are not included.
public int Count { get; }
Property Value
Methods
Clear()
Removes all cached text drawing data.
public void Clear()
Remarks
Draws already in progress can continue using previously cached data and can populate the cache again after this method returns.