GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
gp_multi_tone.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2/*
3 * Copyright (C) 2009-2013 Cyril Hrubis <metan@ucw.cz>
4 */
5
6#ifndef FILTERS_GP_MULTI_TONE_H
7#define FILTERS_GP_MULTI_TONE_H
8
9#include <filters/gp_filter.h>
10
11int gp_filter_multitone_ex(const gp_pixmap *const src,
12 gp_coord x_src, gp_coord y_src,
13 gp_size w_src, gp_size h_src,
14 gp_pixmap *dst,
15 gp_coord x_dst, gp_coord y_dst,
16 gp_pixel pixels[], gp_size pixels_size,
17 gp_progress_cb *callback);
18
19static inline int gp_filter_multitone(const gp_pixmap *const src,
20 gp_pixmap *dst,
21 gp_pixel pixels[], gp_size pixels_size,
22 gp_progress_cb *callback)
23{
24 return gp_filter_multitone_ex(src, 0, 0, src->w, src->h, dst, 0, 0,
25 pixels, pixels_size, callback);
26}
27
28gp_pixmap *gp_filter_multitone_ex_alloc(const gp_pixmap *const src,
29 gp_coord x_src, gp_coord y_src,
30 gp_size w_src, gp_size h_src,
31 gp_pixel_type dst_pixel_type,
32 gp_pixel pixels[], gp_size pixels_size,
33 gp_progress_cb *callback);
34
35static inline gp_pixmap *gp_filter_multitone_alloc(const gp_pixmap *const src,
36 gp_pixel_type dst_pixel_type,
37 gp_pixel pixels[],
38 gp_size pixels_size,
39 gp_progress_cb *callback)
40{
41 return gp_filter_multitone_ex_alloc(src, 0, 0, src->w, src->h,
42 dst_pixel_type,
43
44 pixels, pixels_size, callback);
45}
46
47#endif /* FILTERS_GP_MULTI_TONE_H */
uint32_t gp_pixel
Pixel integer value.
Definition gp_types.h:33
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.
gp_pixel_type
List of all pixel types.
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.