GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
backends
gp_cursor.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: LGPL-2.1-or-later
2
/*
3
* Copyright (C) 2024 Cyril Hrubis <metan@ucw.cz>
4
*/
5
10
#ifndef GP_CURSOR
11
#define GP_CURSOR
12
13
#include <stdint.h>
14
#include <
core/gp_types.h
>
15
#include <
core/gp_pixel.h
>
16
18
typedef
struct
gp_cursor
{
24
int8_t
x_off
, y_off;
26
uint8_t
w
, h;
38
uint8_t *
pixmap
;
39
}
gp_cursor
;
40
49
extern
gp_cursor
*
gp_cursors_32
[];
50
61
void
gp_cursor_render
(
gp_cursor
*self,
gp_pixmap
*dst,
62
gp_pixel
fg,
gp_pixel
bg, uint32_t x_off, uint32_t y_off);
63
64
#endif
/* GP_CURSOR */
gp_types.h
A common types.
gp_pixel
uint32_t gp_pixel
Pixel integer value.
Definition
gp_types.h:33
gp_cursor
struct gp_cursor gp_cursor
A cursor pixmap.
gp_cursors_32
gp_cursor * gp_cursors_32[]
gp_cursor_render
void gp_cursor_render(gp_cursor *self, gp_pixmap *dst, gp_pixel fg, gp_pixel bg, uint32_t x_off, uint32_t y_off)
Renders a cursor into a pixmap.
gp_pixel.h
A pixel description.
gp_cursor
A cursor pixmap.
Definition
gp_cursor.h:18
gp_cursor::w
uint8_t w
Cursor pixmap size in pixels.
Definition
gp_cursor.h:26
gp_cursor::pixmap
uint8_t * pixmap
A cursor pixmap.
Definition
gp_cursor.h:38
gp_cursor::x_off
int8_t x_off
Offset to start drawing the cursor in pixels.
Definition
gp_cursor.h:24
gp_pixmap
A pixmap buffer.
Definition
gp_pixmap.h:33
Generated by
1.12.0