MLX42 1.0
MLX42
|
Go to the source code of this file.
Functions | |
static void | mlx_draw_char (mlx_image_t *image, int32_t texoffset, int32_t imgoffset) |
const mlx_texture_t * | mlx_get_font (void) |
int32_t | mlx_get_texoffset (char c) |
mlx_image_t * | mlx_put_string (mlx_t *mlx, const char *str, int32_t x, int32_t y) |
|
static |
Does the actual copying of pixels form the atlas buffer to the image buffer.
Skips any non-printable characters.
image | The image to draw on. |
texture | The font_atlas. |
texoffset | The character texture X offset. |
imgoffset | The image X offset. |
Definition at line 29 of file mlx_font.c.
const mlx_texture_t * mlx_get_font | ( | void | ) |
Retrieve the texture data for the built-in font.
Definition at line 46 of file mlx_font.c.
This function lets you retrieve the X offset of the given char in the font texture.
NOTE: A single character is 10 * 20 in pixels!
[in] | c | The character to get the offset from. |
Definition at line 51 of file mlx_font.c.
Draws a string on an image and then outputs it to the window.
[in] | mlx | The MLX instance handle. |
[in] | str | The string to draw. |
[in] | x | The X location. |
[in] | y | The Y location. |
Definition at line 60 of file mlx_font.c.