Exemplo n.º 1
0
        void ConfigureCaching(GlyphCacheOptions options)
        {
            // TODO: ignore for now.

            // For now, manually configure, later on, we may need configuration to do that.
            filledCache = new Cache <float>(1.0f, 3.0f,
                                            new LRU <float>(0.1f, 1.0f));
        }
Exemplo n.º 2
0
        /// <summary>
        /// A glyph constructor.
        /// </summary>
        /// <param name="unicode">The unicode character.</param>
        /// <param name="outline">Outline.</param>
        /// <param name="advance">The advance after glyph.</param>
        internal Glyph(string unicode, OutlineCompound2f outline,
                       float advance, GlyphCacheOptions options)
        {
            this.unicode = unicode;
            this.outline = outline;
            this.advance = advance;

            ConfigureCaching(options);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Adds a manual glyph.
 /// </summary>
 /// <param name="unicode">The unicode character.</param>
 /// <param name="outline">The outline.</param>
 /// <param name="advance">The advancement.</param>
 /// <param name="options">Caching options.</param>
 public void AddManual(string unicode, OutlineCompound2f outline, float advance,
                       GlyphCacheOptions options)
 {
     glyphs.Add(unicode, new Glyph(unicode, outline, advance, options));
 }