Skip to content

finite_draw_set_draw_position

The finite_draw_set_draw_position function attempts to set the draw position relative to screen.

void finite_draw_set_draw_position(FiniteShell *shell, double x, double y)
TypeDescription
FiniteShell *shellThe FiniteShell where the window is.
double xThe x position to set the draw position to.
double yThe y position to set the draw position to.
#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);

If shell.cr is undefined, this function will create a new Cairo draw tool and set it to shell.cr

This function must have a valid FiniteShell

This function uses Cairo which requires a valid cairo_surface_t in FiniteShell.cairo_surface beforehand.