示例#1
0
        /// <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;
        }
示例#2
0
        /// <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;
        }
示例#3
0
 /// <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);
 }
示例#4
0
 internal void RemoveChildManager(Manager child)
 {
     childManagers.Remove(child);
 }
示例#5
0
 internal void AddChildManager(Manager child)
 {
     childManagers.Add(child);
 }