semicongine/text

Search:
Group by:

Procs

proc add(textbuffer: var TextBuffer; text: seq[Rune]; position: Vec3f;
         alignment: TextAlignment = Left; anchor: Vec2f = vec2(0, 0);
         scale: float32 = 1.0'f32; color: Vec4f = vec4(1, 1, 1, 1);
         capacity: int = 0): TextHandle
This should be called again after aspect ratio of window changes
proc add(textbuffer: var TextBuffer; text: string; position: Vec3f;
         alignment: TextAlignment = Left; anchor: Vec2f = vec2(0, 0);
         scale: float32 = 1.0'f32; color: Vec4f = vec4(1, 1, 1, 1);
         capacity: int = 0): TextHandle
proc alignment(textbuffer: var TextBuffer; textHandle: TextHandle;
               alignment: TextAlignment)
proc anchor(textbuffer: var TextBuffer; textHandle: TextHandle; anchor: Vec2f)
proc color(textbuffer: var TextBuffer; textHandle: TextHandle; color: Vec4f)
proc initTextBuffer[MaxGlyphs: static int](font: Font[MaxGlyphs];
    bufferSize: int; renderdata: var RenderData; baseScale = 1.0'f32): TextBuffer[
    MaxGlyphs]
proc position(textbuffer: var TextBuffer; textHandle: TextHandle;
              position: Vec3f)
proc refresh(textbuffer: var TextBuffer; flush = false)
proc renderTextBuffer(commandBuffer: VkCommandBuffer; pipeline: Pipeline;
                      textbuffer: TextBuffer)
proc reset(textbuffer: var TextBuffer)
proc scale(textbuffer: var TextBuffer; textHandle: TextHandle; scale: float32)
proc text(textbuffer: var TextBuffer; textHandle: TextHandle; text: seq[Rune])
proc text(textbuffer: var TextBuffer; textHandle: TextHandle; text: string)
proc textDimension(font: Font; text: seq[Rune]): Vec2f
proc textDimension(font: Font; text: string): Vec2f
proc textDimension(textBuffer: TextBuffer; text: string | seq[Rune]): Vec2f
proc updateGlyphData(textbuffer: var TextBuffer)
proc updateGlyphData(textbuffer: var TextBuffer; textHandle: TextHandle)
proc width(font: Font; text: seq[Rune]): float32
proc width(font: Font; text: string): float32