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



1876
1877
1878
# File 'lib/imgui.rb', line 1876

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



1830
1831
1832
# File 'lib/imgui.rb', line 1830

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



1834
1835
1836
# File 'lib/imgui.rb', line 1834

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

#BuildLookupTableObject



1838
1839
1840
# File 'lib/imgui.rb', line 1838

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

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



1842
1843
1844
1845
1846
# File 'lib/imgui.rb', line 1842

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



1848
1849
1850
# File 'lib/imgui.rb', line 1848

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

#ClearOutputDataObject



1852
1853
1854
# File 'lib/imgui.rb', line 1852

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

#destroyObject



1900
1901
1902
# File 'lib/imgui.rb', line 1900

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

#FindGlyph(c) ⇒ Object



1856
1857
1858
# File 'lib/imgui.rb', line 1856

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

#FindGlyphNoFallback(c) ⇒ Object



1860
1861
1862
# File 'lib/imgui.rb', line 1860

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

#GetCharAdvance(c) ⇒ Object



1864
1865
1866
# File 'lib/imgui.rb', line 1864

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

#GetDebugNameObject



1868
1869
1870
# File 'lib/imgui.rb', line 1868

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

#GrowIndex(new_size) ⇒ Object



1872
1873
1874
# File 'lib/imgui.rb', line 1872

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

#IsGlyphRangeUnused(c_begin, c_last) ⇒ Object



1880
1881
1882
# File 'lib/imgui.rb', line 1880

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

#IsLoadedObject



1884
1885
1886
# File 'lib/imgui.rb', line 1884

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

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



1888
1889
1890
# File 'lib/imgui.rb', line 1888

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



1892
1893
1894
# File 'lib/imgui.rb', line 1892

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



1896
1897
1898
# File 'lib/imgui.rb', line 1896

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