/// <summary> /// Initializes a new instance of the <see cref="CMapCache"/> class. /// </summary> /// <remarks> /// Like all other caches, this one will be destroyed with the cache manager. /// </remarks> /// <param name="manager">A handle to the cache manager.</param> public CMapCache(Manager manager) { IntPtr cacheRef; Error err = FT.FTC_CMapCache_New(manager.Reference, out cacheRef); if (err != Error.Ok) throw new FreeTypeException(err); Reference = cacheRef; }
/// <summary> /// Initializes a new instance of the <see cref="ImageCache"/> class. /// </summary> /// <param name="manager">The parent manager for the image cache.</param> public ImageCache(Manager manager) { if (manager == null) throw new ArgumentNullException("manager"); IntPtr cacheRef; Error err = FT.FTC_ImageCache_New(manager.Reference, out cacheRef); if (err != Error.Ok) throw new FreeTypeException(err); parentManager = manager; Reference = cacheRef; }
/// <summary> /// Decrement a cache node's internal reference count. When the count reaches 0, it is not destroyed but /// becomes eligible for subsequent cache flushes. /// </summary> /// <param name="manager">The cache manager handle.</param> public void Unref(Manager manager) { FT.FTC_Node_Unref(Reference, manager.Reference); }
internal void RemoveChildManager(Manager child) { childManagers.Remove(child); }
internal void AddChildManager(Manager child) { childManagers.Add(child); }