struct SF::Glyph

Overview

Structure describing a glyph

A glyph is the visual representation of a character.

The SF::Glyph structure provides the information needed to handle the glyph:

See also: SF::Font

Defined in:

graphics/obj.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Default constructor


[View source]

Instance Method Detail

def advance : Float32 #

Offset to move horizontally to the next character


[View source]
def advance=(advance : Number) #

[View source]
def bounds : FloatRect #

Bounding rectangle of the glyph, in coordinates relative to the baseline


[View source]
def bounds=(bounds : FloatRect) #

[View source]
def dup : Glyph #
Description copied from struct Value

Returns a shallow copy of this object.

Because Value is a value type, this method returns self, which already involves a shallow copy of this object because value types are passed by value.


[View source]
def texture_rect : IntRect #

Texture coordinates of the glyph inside the font's texture


[View source]
def texture_rect=(texture_rect : IntRect) #

[View source]