summaryrefslogtreecommitdiff
path: root/src/lib/filter.h
blob: 56ea46a1f9b739f2d86fdf3024b3d0b18eb361e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef __FILTER
#define __FILTER 1

#include "common.h"

typedef struct _imlib_filter ImlibFilter;
typedef struct _imlib_filter_color ImlibFilterColor;
typedef struct _imlib_filter_pixel ImlibFilterPixel;

struct _imlib_filter_pixel {
   int                 xoff, yoff;
   int                 a, r, g, b;
};

struct _imlib_filter_color {
   int                 size, entries;
   int                 div, cons;
   ImlibFilterPixel   *pixels;
};

struct _imlib_filter {
   ImlibFilterColor    alpha, red, green, blue;
};

ImlibFilter        *__imlib_CreateFilter(int size);
void                __imlib_FreeFilter(ImlibFilter * fil);
void                __imlib_FilterSet(ImlibFilterColor * fil, int x, int y,
                                      int a, int r, int g, int b);
void                __imlib_FilterSetColor(ImlibFilterColor * fil, int x, int y,
                                           int a, int r, int g, int b);
void                __imlib_FilterDivisors(ImlibFilter * fil,
                                           int a, int r, int g, int b);
void                __imlib_FilterConstants(ImlibFilter * fil,
                                            int a, int r, int g, int b);
void                __imlib_FilterImage(ImlibImage * im, ImlibFilter * fil);

#endif