Class: Raylib::Font
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Font
- Defined in:
- lib/raylib/core/structs/font.rb
Overview
Font, font texture and GlyphInfo array data
Class Method Summary collapse
Instance Method Summary collapse
-
#base_size ⇒ Integer
Base size (default chars height).
-
#base_size=(new_base_size) ⇒ Object
Sets Base size (default chars height).
-
#glyph_count ⇒ Integer
Number of glyph characters.
-
#glyph_count=(new_glyph_count) ⇒ Object
Sets Number of glyph characters.
-
#glyph_padding ⇒ Integer
Padding around the glyph characters.
-
#glyph_padding=(new_glyph_padding) ⇒ Object
Sets Padding around the glyph characters.
-
#glyphs ⇒ GlyphInfo *
Glyphs info data.
-
#glyphs=(new_glyphs) ⇒ Object
Sets Glyphs info data.
-
#recs ⇒ Rectangle *
Rectangles in texture for the glyphs.
-
#recs=(new_recs) ⇒ Object
Sets Rectangles in texture for the glyphs.
-
#texture ⇒ Texture2D
Texture atlas containing the glyphs.
-
#texture=(new_texture) ⇒ Object
Sets Texture atlas containing the glyphs.
- #to_s ⇒ Object
Class Method Details
.create(base_size, glyph_count, glyph_padding, texture, recs, glyphs) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/raylib/core/structs/font.rb', line 13 def self.create(base_size, glyph_count, glyph_padding, texture, recs, glyphs) new.tap do |instance| instance[:baseSize] = base_size instance[:glyphCount] = glyph_count instance[:glyphPadding] = glyph_padding instance[:texture] = texture instance[:recs] = recs instance[:glyphs] = glyphs end end |
Instance Method Details
#base_size ⇒ Integer
Base size (default chars height)
30 |
# File 'lib/raylib/core/structs/font.rb', line 30 def base_size = self[:baseSize] |
#base_size=(new_base_size) ⇒ Object
Sets Base size (default chars height)
33 34 35 |
# File 'lib/raylib/core/structs/font.rb', line 33 def base_size=(new_base_size) self[:baseSize] = new_base_size end |
#glyph_count ⇒ Integer
Number of glyph characters
39 |
# File 'lib/raylib/core/structs/font.rb', line 39 def glyph_count = self[:glyphCount] |
#glyph_count=(new_glyph_count) ⇒ Object
Sets Number of glyph characters
42 43 44 |
# File 'lib/raylib/core/structs/font.rb', line 42 def glyph_count=(new_glyph_count) self[:glyphCount] = new_glyph_count end |
#glyph_padding ⇒ Integer
Padding around the glyph characters
48 |
# File 'lib/raylib/core/structs/font.rb', line 48 def glyph_padding = self[:glyphPadding] |
#glyph_padding=(new_glyph_padding) ⇒ Object
Sets Padding around the glyph characters
51 52 53 |
# File 'lib/raylib/core/structs/font.rb', line 51 def glyph_padding=(new_glyph_padding) self[:glyphPadding] = new_glyph_padding end |
#glyphs ⇒ GlyphInfo *
Glyphs info data
75 |
# File 'lib/raylib/core/structs/font.rb', line 75 def glyphs = self[:glyphs] |
#glyphs=(new_glyphs) ⇒ Object
Sets Glyphs info data
78 79 80 |
# File 'lib/raylib/core/structs/font.rb', line 78 def glyphs=(new_glyphs) self[:glyphs] = new_glyphs end |
#recs ⇒ Rectangle *
Rectangles in texture for the glyphs
66 |
# File 'lib/raylib/core/structs/font.rb', line 66 def recs = self[:recs] |
#recs=(new_recs) ⇒ Object
Sets Rectangles in texture for the glyphs
69 70 71 |
# File 'lib/raylib/core/structs/font.rb', line 69 def recs=(new_recs) self[:recs] = new_recs end |
#texture ⇒ Texture2D
Texture atlas containing the glyphs
57 |
# File 'lib/raylib/core/structs/font.rb', line 57 def texture = self[:texture] |
#texture=(new_texture) ⇒ Object
Sets Texture atlas containing the glyphs
60 61 62 |
# File 'lib/raylib/core/structs/font.rb', line 60 def texture=(new_texture) self[:texture] = new_texture end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/raylib/core/structs/font.rb', line 24 def to_s "Raylib::Font##{object_id} base_size=#{base_size} glyph_count=#{glyph_count} glyph_padding=#{glyph_padding} texture=#{texture} recs=#{recs} glyphs=#{glyphs}" end |