finite_draw_set_text
The finite_draw_set_text function attempts to draw text to the screen.
void finite_draw_set_text(FiniteShell *shell, char *text, FiniteColorGroup *color)Parameters
Section titled “Parameters”| Type | Description |
|---|---|
FiniteShell *shell | The FiniteShell where the window is. |
char *text | The text the screen. |
FiniteColorGroup *color | The color of the text to draw. |
Code Example
Section titled “Code Example”#include <finite/draw.h>
finite_draw_set_font(myShell, "KunbhSans", false, false, 24);FiniteColorGroup white = { .r = 0, .g = 0, .b = 0};finite_draw_set_draw_position(myShell, 30, 20);finite_draw_set_text(myShell, "Hello there!", &white);Standard Usage
Section titled “Standard Usage”This function is intended to be used to draw colored text to screen. However it does not take in a position. As such, you should call finite_draw_set_draw_position directly before each finite_draw_set_text call to ensure that things are rendered at the correctly.
This function must have a valid FiniteShell
This function uses Cairo which requires a valid cairo_surface_t in FiniteShell.cairo_surface beforehand.