GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_cursor.h File Reference

A cursor rendering implementation. More...

#include <stdint.h>
#include <core/gp_types.h>
#include <core/gp_pixel.h>

Go to the source code of this file.

Data Structures

struct  gp_cursor
 A cursor pixmap. More...
 

Typedefs

typedef struct gp_cursor gp_cursor
 A cursor pixmap.
 

Functions

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.
 

Variables

gp_cursorgp_cursors_32 []
 

Detailed Description

A cursor rendering implementation.

Definition in file gp_cursor.h.

Function Documentation

◆ 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.

Parameters
selfA cursor.
dstA pixmap to draw the cursor into.
fgA foreground color.
bgA background color.
x_offAn x offset.
y_offAn y offset.

Variable Documentation

◆ gp_cursors_32

gp_cursor* gp_cursors_32[]
extern

Default 32x32 pixels cursors.

0 - Arrow 1 - Text Edit (I-beam) 2 - Crosshair 3 - Hand