Rename GP_Context -> GP_Pixmap
[gfxprim.git] / include / filters / GP_Arithmetic.h
blobe296629646995dcb7871fd22287da507289b20ab
1 /*****************************************************************************
2 * This file is part of gfxprim library. *
3 * *
4 * Gfxprim is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU Lesser General Public *
6 * License as published by the Free Software Foundation; either *
7 * version 2.1 of the License, or (at your option) any later version. *
8 * *
9 * Gfxprim is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12 * Lesser General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU Lesser General Public *
15 * License along with gfxprim; if not, write to the Free Software *
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
17 * Boston, MA 02110-1301 USA *
18 * *
19 * Copyright (C) 2009-2012 Cyril Hrubis <metan@ucw.cz> *
20 * *
21 *****************************************************************************/
25 Arithmetic filters - compute products of two bitmaps.
29 #ifndef FILTERS_GP_ARITHMETIC_H
30 #define FILTERS_GP_ARITHMETIC_H
32 #include "GP_Filter.h"
35 * Addition filter.
37 * Produces saturated (clamped) addtion.
39 int GP_FilterAddition(const GP_Pixmap *src_a,
40 const GP_Pixmap *src_b,
41 GP_Pixmap *dst,
42 GP_ProgressCallback *callback);
44 GP_Pixmap *GP_FilterAdditionAlloc(const GP_Pixmap *src_a,
45 const GP_Pixmap *src_b,
46 GP_ProgressCallback *callback);
49 * Multiply filter.
51 * Produces saturated (clamped) multiplication.
53 int GP_FilterMultiply(const GP_Pixmap *src_a,
54 const GP_Pixmap *src_b,
55 GP_Pixmap *dst,
56 GP_ProgressCallback *callback);
58 GP_Pixmap *GP_FilterMultiplyAlloc(const GP_Pixmap *src_a,
59 const GP_Pixmap *src_b,
60 GP_ProgressCallback *callback);
63 * Difference filter.
65 * Produces symetric difference.
66 * eg. dst = abs(src_a - src_b)
68 int GP_FilterDifference(const GP_Pixmap *src_a,
69 const GP_Pixmap *src_b,
70 GP_Pixmap *dst,
71 GP_ProgressCallback *callback);
73 GP_Pixmap *GP_FilterDifferenceAlloc(const GP_Pixmap *src_a,
74 const GP_Pixmap *src_b,
75 GP_ProgressCallback *callback);
78 * Maximum filter.
80 int GP_FilterMax(const GP_Pixmap *src_a,
81 const GP_Pixmap *src_b,
82 GP_Pixmap *dst,
83 GP_ProgressCallback *callback);
85 GP_Pixmap *GP_FilterMaxAlloc(const GP_Pixmap *src_a,
86 const GP_Pixmap *src_b,
87 GP_ProgressCallback *callback);
90 * Minimum filter.
92 int GP_FilterMin(const GP_Pixmap *src_a,
93 const GP_Pixmap *src_b,
94 GP_Pixmap *dst,
95 GP_ProgressCallback *callback);
97 GP_Pixmap *GP_FilterMinAlloc(const GP_Pixmap *src_a,
98 const GP_Pixmap *src_b,
99 GP_ProgressCallback *callback);
101 #endif /* FILTERS_GP_ARITHMETIC_H */