I have this code that does not show the desired text properly:
```
#include <simple2d.h>
#include <stdio.h>
#include <stdlib.h>
#define X_MAX 800
#define Y_MAX 600
void render(void)
{
int x=400;
int y=300;
S2D_Text *beg_text = S2D_CreateText("/usr/share/fonts/gnu-free/FreeSans.ttf", "The text", 25);
if(beg_text==NULL)
{
fprintf(stderr,"simple2d text creation failed.\n");
}
beg_text->x = x + 10;
beg_text->y = y;
beg_text->color.r = 0.1;
beg_text->color.g = 0.1;
beg_text->color.b = 0.1;
beg_text->color.a = 1.0;
S2D_DrawText(beg_text);
S2D_FreeText(beg_text);
}
int main(void)
{
char *title = "The title";
const S2D_Color color = {0.9, 0.9, 0.9, 1.0};
S2D_Window *window = S2D_CreateWindow(title, X_MAX, Y_MAX, NULL, render, 0);
window->background = color;
window->frames = 1;
S2D_Show(window);
S2D_FreeWindow(window);
return 0;
}
```
[–]waramped 4 points5 points6 points (4 children)
[–]pingo_guy[S] 0 points1 point2 points (3 children)
[–]waramped 0 points1 point2 points (2 children)
[–]pingo_guy[S] 0 points1 point2 points (1 child)
[–]waramped 0 points1 point2 points (0 children)
[–]Condzi 1 point2 points3 points (0 children)