GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_point.gen.h
1// SPDX-License-Identifier: GPL-2.1-or-later
2/*
3 * gp_point.gen.h
4 *
5 * GENERATED on 2024 04 14 13:01:18 from gp_point.gen.h.t
6 *
7 * DO NOT MODIFY THIS FILE DIRECTLY!
8 */
9#ifndef GP_POINT_GEN_H
10#define GP_POINT_GEN_H
11
12/*
13 * Point filter prototypes.
14 *
15 * Copyright (C) 2018 Cyril Hrubis <metan@ucw.cz>
16 */
17#include <filters/gp_filter.h>
18
19
20/*** Function prototypes for brightness filter ***/
21
22int gp_filter_brightness_ex(const gp_pixmap *src,
23 gp_coord x_src, gp_coord y_src,
24 gp_size w_src, gp_size h_src,
25 gp_pixmap *dst,
26 gp_coord x_dst, gp_coord y_dst,
27 float p, gp_progress_cb *callback);
28
29gp_pixmap *gp_filter_brightness_ex_alloc(const gp_pixmap *src,
30 gp_coord x_src, gp_coord y_src,
31 gp_size w_src, gp_size h_src,
32 float p, gp_progress_cb *callback);
33
34static inline int gp_filter_brightness(const gp_pixmap *src, gp_pixmap *dst,
35 float p,gp_progress_cb *callback)
36{
37 return gp_filter_brightness_ex(src, 0, 0, src->w, src->h,
38 dst, 0, 0, p, callback);
39}
40
41static inline gp_pixmap *gp_filter_brightness_alloc(const gp_pixmap *src,
42 float p,gp_progress_cb *callback)
43{
44 return gp_filter_brightness_ex_alloc(src, 0, 0, src->w, src->h,
45 p, callback);
46}
47
48/*** Function prototypes for contrast filter ***/
49
50int gp_filter_contrast_ex(const gp_pixmap *src,
51 gp_coord x_src, gp_coord y_src,
52 gp_size w_src, gp_size h_src,
53 gp_pixmap *dst,
54 gp_coord x_dst, gp_coord y_dst,
55 float p, gp_progress_cb *callback);
56
57gp_pixmap *gp_filter_contrast_ex_alloc(const gp_pixmap *src,
58 gp_coord x_src, gp_coord y_src,
59 gp_size w_src, gp_size h_src,
60 float p, gp_progress_cb *callback);
61
62static inline int gp_filter_contrast(const gp_pixmap *src, gp_pixmap *dst,
63 float p,gp_progress_cb *callback)
64{
65 return gp_filter_contrast_ex(src, 0, 0, src->w, src->h,
66 dst, 0, 0, p, callback);
67}
68
69static inline gp_pixmap *gp_filter_contrast_alloc(const gp_pixmap *src,
70 float p,gp_progress_cb *callback)
71{
72 return gp_filter_contrast_ex_alloc(src, 0, 0, src->w, src->h,
73 p, callback);
74}
75
76/*** Function prototypes for brightness_contrast filter ***/
77
78int gp_filter_brightness_contrast_ex(const gp_pixmap *src,
79 gp_coord x_src, gp_coord y_src,
80 gp_size w_src, gp_size h_src,
81 gp_pixmap *dst,
82 gp_coord x_dst, gp_coord y_dst,
83 float b, float c, gp_progress_cb *callback);
84
85gp_pixmap *gp_filter_brightness_contrast_ex_alloc(const gp_pixmap *src,
86 gp_coord x_src, gp_coord y_src,
87 gp_size w_src, gp_size h_src,
88 float b, float c, gp_progress_cb *callback);
89
90static inline int gp_filter_brightness_contrast(const gp_pixmap *src, gp_pixmap *dst,
91 float b, float c,gp_progress_cb *callback)
92{
93 return gp_filter_brightness_contrast_ex(src, 0, 0, src->w, src->h,
94 dst, 0, 0, b, c, callback);
95}
96
97static inline gp_pixmap *gp_filter_brightness_contrast_alloc(const gp_pixmap *src,
98 float b, float c,gp_progress_cb *callback)
99{
100 return gp_filter_brightness_contrast_ex_alloc(src, 0, 0, src->w, src->h,
101 b, c, callback);
102}
103
104/*** Function prototypes for posterize filter ***/
105
106int gp_filter_posterize_ex(const gp_pixmap *src,
107 gp_coord x_src, gp_coord y_src,
108 gp_size w_src, gp_size h_src,
109 gp_pixmap *dst,
110 gp_coord x_dst, gp_coord y_dst,
111 unsigned int steps, gp_progress_cb *callback);
112
113gp_pixmap *gp_filter_posterize_ex_alloc(const gp_pixmap *src,
114 gp_coord x_src, gp_coord y_src,
115 gp_size w_src, gp_size h_src,
116 unsigned int steps, gp_progress_cb *callback);
117
118static inline int gp_filter_posterize(const gp_pixmap *src, gp_pixmap *dst,
119 unsigned int steps,gp_progress_cb *callback)
120{
121 return gp_filter_posterize_ex(src, 0, 0, src->w, src->h,
122 dst, 0, 0, steps, callback);
123}
124
125static inline gp_pixmap *gp_filter_posterize_alloc(const gp_pixmap *src,
126 unsigned int steps,gp_progress_cb *callback)
127{
128 return gp_filter_posterize_ex_alloc(src, 0, 0, src->w, src->h,
129 steps, callback);
130}
131
132/*** Function prototypes for invert filter ***/
133
134int gp_filter_invert_ex(const gp_pixmap *src,
135 gp_coord x_src, gp_coord y_src,
136 gp_size w_src, gp_size h_src,
137 gp_pixmap *dst,
138 gp_coord x_dst, gp_coord y_dst,
139 gp_progress_cb *callback);
140
141gp_pixmap *gp_filter_invert_ex_alloc(const gp_pixmap *src,
142 gp_coord x_src, gp_coord y_src,
143 gp_size w_src, gp_size h_src,
144 gp_progress_cb *callback);
145
146static inline int gp_filter_invert(const gp_pixmap *src, gp_pixmap *dst,
147 gp_progress_cb *callback)
148{
149 return gp_filter_invert_ex(src, 0, 0, src->w, src->h,
150 dst, 0, 0, callback);
151}
152
153static inline gp_pixmap *gp_filter_invert_alloc(const gp_pixmap *src,
154 gp_progress_cb *callback)
155{
156 return gp_filter_invert_ex_alloc(src, 0, 0, src->w, src->h,
157 callback);
158}
159
160#endif /* GP_POINT_GEN_H */
int gp_coord
Integer type for coordinates i.e. x, y, ...
Definition gp_types.h:19
unsigned int gp_size
Integer type for sizes i.e. w, h, ...
Definition gp_types.h:24
Common filter includes.
A pixmap buffer.
Definition gp_pixmap.h:33
uint32_t h
Pixmap height in pixels.
Definition gp_pixmap.h:46
uint32_t w
Pixmap width in pixels.
Definition gp_pixmap.h:44
Progress callback.