コード例 #1
0
        /// <inheritdoc/>
        public override void GetCodePointRenderInfo(Int32 c, out GlyphRenderInfo info)
        {
            if (c < 0 || c > Char.MaxValue)
            {
                c = SubstitutionCharacter;
            }

            var texture       = this.texture;
            var textureRegion = glyphs[(Char)c];
            var advance       = textureRegion.Width;

            info = new GlyphRenderInfo
            {
                Texture       = texture,
                TextureRegion = textureRegion,
                Advance       = advance,
            };
        }
コード例 #2
0
 /// <inheritdoc/>
 public override void GetGlyphIndexRenderInfo(Int32 glyphIndex, out GlyphRenderInfo info) =>
 throw new NotSupportedException();
コード例 #3
0
 /// <summary>
 /// Gets the information required to draw the specified glyph.
 /// </summary>
 /// <param name="glyphIndex">The glyph index of the glyph to draw.</param>
 /// <param name="info">The rendering information for the specified glyph.</param>
 public abstract void GetGlyphIndexRenderInfo(Int32 glyphIndex, out GlyphRenderInfo info);
コード例 #4
0
 /// <summary>
 /// Gets the information required to draw the specified glyph.
 /// </summary>
 /// <param name="c">The 32-bit Unicode value of the glyph to draw.</param>
 /// <param name="info">The rendering information for the specified glyph.</param>
 public abstract void GetGlyphRenderInfo(Int32 c, out GlyphRenderInfo info);
コード例 #5
0
 /// <summary>
 /// Gets the information required to draw the specified Unicode code point.
 /// </summary>
 /// <param name="codePoint">The 32-bit Unicode value of the glyph to draw.</param>
 /// <param name="info">The rendering information for the specified glyph.</param>
 public abstract void GetCodePointRenderInfo(Int32 codePoint, out GlyphRenderInfo info);