GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_pixel_alias.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: LGPL-2.1-or-later
2
/*
3
* Copyright (C) 2023 Cyril Hrubis <metan@ucw.cz>
4
*/
5
10
#ifndef CORE_GP_PIXEL_ALIAS_H
11
#define CORE_GP_PIXEL_ALIAS_H
12
13
#include <
core/gp_pixel.gen.h
>
14
#include <
core/gp_byte_order.h
>
15
19
#if __BYTE_ORDER == __LITTLE_ENDIAN
20
# ifdef GP_PIXEL_RGB565_LE
21
# define GP_PIXEL_RGB565 GP_PIXEL_RGB565_LE
22
# endif
23
#else
24
# ifdef GP_PIXEL_RGB565_BE
25
# define GP_PIXEL_RGB565 GP_PIXEL_RGB565_BE
26
# endif
27
#endif
28
34
enum
gp_pixel_type_alias
{
35
#ifdef GP_PIXEL_G1_UB
37
GP_PIXEL_G1 = GP_PIXEL_G1_UB,
38
#endif
39
#ifdef GP_PIXEL_G2_UB
41
GP_PIXEL_G2 = GP_PIXEL_G2_UB,
42
#endif
43
#ifdef GP_PIXEL_G4_UB
45
GP_PIXEL_G4 = GP_PIXEL_G4_UB,
46
#endif
47
};
48
49
#ifdef GP_PIXEL_G1_UB
50
# define GP_PIXEL_G1 GP_PIXEL_G1_UB
51
# define GP_PIXEL_ADDR_1BPP GP_PIXEL_ADDR_1BPP_UB
52
# define GP_PIXEL_ADDR_OFFSET_1BPP GP_PIXEL_ADDR_OFFSET_1BPP_UB
53
# define gp_getpixel_raw_1BPP gp_getpixel_raw_1BPP_UB
54
# define gp_putpixel_raw_1BPP gp_putpixel_raw_1BPP_UB
55
#endif
56
57
#ifdef GP_PIXEL_G2_UB
58
# define GP_PIXEL_G2 GP_PIXEL_G2_UB
59
# define GP_PIXEL_ADDR_2BPP GP_PIXEL_ADDR_2BPP_UB
60
# define GP_PIXEL_ADDR_OFFSET_2BPP GP_PIXEL_ADDR_OFFSET_2BPP_UB
61
# define gp_getpixel_raw_2BPP gp_getpixel_raw_2BPP_UB
62
# define gp_putpixel_raw_2BPP gp_putpixel_raw_2BPP_UB
63
#endif
64
65
#ifdef GP_PIXEL_G4_UB
66
# define GP_PIXEL_G4 GP_PIXEL_G4_UB
67
# define GP_PIXEL_ADDR_4BPP GP_PIXEL_ADDR_4BPP_UB
68
# define GP_PIXEL_ADDR_OFFSET_4BPP GP_PIXEL_ADDR_OFFSET_4BPP_UB
69
# define gp_getpixel_raw_4BPP gp_getpixel_raw_4BPP_UB
70
# define gp_putpixel_raw_4BPP gp_putpixel_raw_4BPP_UB
71
#endif
72
73
#endif
/* CORE_GP_PIXEL_ALIAS_H */
gp_byte_order.h
A byte order (endians) defintions.
gp_pixel.gen.h
A pixel defintions generated from gen/include/gfxprim_config.py.
gp_pixel_type_alias
gp_pixel_type_alias
List of pixel type aliases.
Definition
gp_pixel_alias.h:34
include
core
gp_pixel_alias.h
Generated by
1.13.2