Types
PText = ref TText
TText = object of TImage fFont: PFontObject fText: seq[string]
Procs
proc init(obj: PText; font: PFontObject; text: varargs[string])
proc free(obj: PText)
proc newText(font: PFontObject; x: int = 0; y: int = 0; text: varargs[string] = @ ["text"]): PText
-
font: font object to write text with.
x, y: draw offset.
text: text lines.
Methods
method text(obj: PText): seq[string] {.inline.}
- Get text lines.
method text=(obj: PText; value: varargs[string])
- Set text lines.
method setText(obj: PText; text: varargs[string])
- Set text lines.
method line(obj: PText; line: int = 0): string {.inline.}
- Get specific line of text.
method append(obj: PText; line: int = 0; value: string)
- Append to specific line of text.
method font(obj: PText): PFontObject {.inline.}
- Get text font object.
method add(obj: PText; value: string)
- Add new line.
method insert(obj: PText; value: string; i: int = 0)
-
Insert new line in text.
i: index of inserted line.