GetGlyph() публичный Метод

Get a glyph in the font
public GetGlyph ( uint codePoint, uint characterSize, bool bold, float outlineThickness ) : Glyph
codePoint uint Unicode code point of the character to get
characterSize uint Character size
bold bool Retrieve the bold version or the regular one?
outlineThickness float Thickness of outline (when != 0 the glyph will not be filled)
Результат Glyph
Пример #1
0
        private void RenderMoons(RenderWindow window, ICalendar calendar)
        {
            Vector2f position = new Vector2f(0, window.Size.Y - font.GetGlyph(100, CharacterSize, false).Bounds.Height - 100);

            foreach (Moon moon in calendar.Moons)
            {
                char c    = GetGlyphForMoonState(moon);
                var  text = new Text(moon.Name + " " + c, font, CharacterSize)
                {
                    Color    = _moonColors[moon.Name],
                    Position = position
                };
                text.Draw(window, RenderStates.Default);
                position.X += text.GetGlobalBounds().Width;
            }
        }
Пример #2
0
 /// <summary>
 /// Get a glyph in the font
 /// </summary>
 /// <param name="codePoint">Unicode code point of the character to get</param>
 /// <param name="characterSize">Character size</param>
 /// <param name="bold">Retrieve the bold version or the regular one?</param>
 /// <param name="outlineThickness">Thickness of outline (when != 0 the glyph will not be filled)</param>
 /// <returns>The glyph corresponding to the character</returns>
 public Glyph GetGlyph(uint codePoint, uint characterSize, bool bold, float outlineThickness)
 {
     return(new Glyph(SFMLFont.GetGlyph(codePoint, characterSize, bold, outlineThickness)));
 }
Пример #3
0
 internal virtual Glyph GetGlyph(char c, int size, bool bold)
 {
     return(font.GetGlyph((uint)c, (uint)size, bold, 1f));
 }
Пример #4
0
 internal virtual Glyph GetGlyph(char c, int size, bool bold, float outlineThicknes = 0f)
 {
     return(font.GetGlyph((uint)c, (uint)size, bold, outlineThicknes));
 }