Class: ImFont

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/imgui.rb

Overview

Font runtime data and rendering ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.createObject



1808
1809
1810
# File 'lib/imgui.rb', line 1808

def self.create()
  return ImFont.new(ImGui::ImFont_ImFont())
end

Instance Method Details

#AddGlyph(src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x) ⇒ Object



1762
1763
1764
# File 'lib/imgui.rb', line 1762

def AddGlyph(src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x)
  ImGui::ImFont_AddGlyph(self, src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x)
end

#AddRemapChar(dst, src, overwrite_dst = true) ⇒ Object



1766
1767
1768
# File 'lib/imgui.rb', line 1766

def AddRemapChar(dst, src, overwrite_dst = true)
  ImGui::ImFont_AddRemapChar(self, dst, src, overwrite_dst)
end

#BuildLookupTableObject



1770
1771
1772
# File 'lib/imgui.rb', line 1770

def BuildLookupTable()
  ImGui::ImFont_BuildLookupTable(self)
end

#CalcTextSizeA(size, max_width, wrap_width, text_begin, text_end = nil, remaining = nil) ⇒ Object



1774
1775
1776
1777
1778
# File 'lib/imgui.rb', line 1774

def CalcTextSizeA(size, max_width, wrap_width, text_begin, text_end = nil, remaining = nil)
  pOut = ImVec2.new
  ImGui::ImFont_CalcTextSizeA(pOut, self, size, max_width, wrap_width, text_begin, text_end, remaining)
  return pOut
end

#CalcWordWrapPositionA(scale, text, text_end, wrap_width) ⇒ Object



1780
1781
1782
# File 'lib/imgui.rb', line 1780

def CalcWordWrapPositionA(scale, text, text_end, wrap_width)
  ImGui::ImFont_CalcWordWrapPositionA(self, scale, text, text_end, wrap_width)
end

#ClearOutputDataObject



1784
1785
1786
# File 'lib/imgui.rb', line 1784

def ClearOutputData()
  ImGui::ImFont_ClearOutputData(self)
end

#destroyObject



1832
1833
1834
# File 'lib/imgui.rb', line 1832

def destroy()
  ImGui::ImFont_destroy(self)
end

#FindGlyph(c) ⇒ Object



1788
1789
1790
# File 'lib/imgui.rb', line 1788

def FindGlyph(c)
  ImGui::ImFont_FindGlyph(self, c)
end

#FindGlyphNoFallback(c) ⇒ Object



1792
1793
1794
# File 'lib/imgui.rb', line 1792

def FindGlyphNoFallback(c)
  ImGui::ImFont_FindGlyphNoFallback(self, c)
end

#GetCharAdvance(c) ⇒ Object



1796
1797
1798
# File 'lib/imgui.rb', line 1796

def GetCharAdvance(c)
  ImGui::ImFont_GetCharAdvance(self, c)
end

#GetDebugNameObject



1800
1801
1802
# File 'lib/imgui.rb', line 1800

def GetDebugName()
  ImGui::ImFont_GetDebugName(self)
end

#GrowIndex(new_size) ⇒ Object



1804
1805
1806
# File 'lib/imgui.rb', line 1804

def GrowIndex(new_size)
  ImGui::ImFont_GrowIndex(self, new_size)
end

#IsGlyphRangeUnused(c_begin, c_last) ⇒ Object



1812
1813
1814
# File 'lib/imgui.rb', line 1812

def IsGlyphRangeUnused(c_begin, c_last)
  ImGui::ImFont_IsGlyphRangeUnused(self, c_begin, c_last)
end

#IsLoadedObject



1816
1817
1818
# File 'lib/imgui.rb', line 1816

def IsLoaded()
  ImGui::ImFont_IsLoaded(self)
end

#RenderChar(draw_list, size, pos, col, c) ⇒ Object



1820
1821
1822
# File 'lib/imgui.rb', line 1820

def RenderChar(draw_list, size, pos, col, c)
  ImGui::ImFont_RenderChar(self, draw_list, size, pos, col, c)
end

#RenderText(draw_list, size, pos, col, clip_rect, text_begin, text_end, wrap_width = 0.0, cpu_fine_clip = false) ⇒ Object



1824
1825
1826
# File 'lib/imgui.rb', line 1824

def RenderText(draw_list, size, pos, col, clip_rect, text_begin, text_end, wrap_width = 0.0, cpu_fine_clip = false)
  ImGui::ImFont_RenderText(self, draw_list, size, pos, col, clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip)
end

#SetGlyphVisible(c, visible) ⇒ Object



1828
1829
1830
# File 'lib/imgui.rb', line 1828

def SetGlyphVisible(c, visible)
  ImGui::ImFont_SetGlyphVisible(self, c, visible)
end