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



1608
1609
1610
# File 'lib/imgui.rb', line 1608

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



1562
1563
1564
# File 'lib/imgui.rb', line 1562

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



1566
1567
1568
# File 'lib/imgui.rb', line 1566

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

#BuildLookupTableObject



1570
1571
1572
# File 'lib/imgui.rb', line 1570

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

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



1574
1575
1576
1577
1578
# File 'lib/imgui.rb', line 1574

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



1580
1581
1582
# File 'lib/imgui.rb', line 1580

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

#ClearOutputDataObject



1584
1585
1586
# File 'lib/imgui.rb', line 1584

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

#destroyObject



1632
1633
1634
# File 'lib/imgui.rb', line 1632

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

#FindGlyph(c) ⇒ Object



1588
1589
1590
# File 'lib/imgui.rb', line 1588

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

#FindGlyphNoFallback(c) ⇒ Object



1592
1593
1594
# File 'lib/imgui.rb', line 1592

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

#GetCharAdvance(c) ⇒ Object



1596
1597
1598
# File 'lib/imgui.rb', line 1596

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

#GetDebugNameObject



1600
1601
1602
# File 'lib/imgui.rb', line 1600

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

#GrowIndex(new_size) ⇒ Object



1604
1605
1606
# File 'lib/imgui.rb', line 1604

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

#IsGlyphRangeUnused(c_begin, c_last) ⇒ Object



1612
1613
1614
# File 'lib/imgui.rb', line 1612

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

#IsLoadedObject



1616
1617
1618
# File 'lib/imgui.rb', line 1616

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

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



1620
1621
1622
# File 'lib/imgui.rb', line 1620

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



1624
1625
1626
# File 'lib/imgui.rb', line 1624

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



1628
1629
1630
# File 'lib/imgui.rb', line 1628

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