forked from mypaint/libmypaint
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbrushmodes.h
90 lines (77 loc) · 3.89 KB
/
brushmodes.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef BRUSHMODES_H
#define BRUSHMODES_H
typedef struct {
int x0; // Bounding box for the dab.
int y0; // Top left corner: (x0, y0)
int x1; // Top right corner: (x1, y1)
int y1; // Cordinates are pixel offsets into a tile
} DabBounds;
void draw_dab_pixels_BlendMode_Normal (float * mask,
float * rgba_buffer,
DabBounds * b,
float * brushcolor,
float opacity,
float volume);
void
draw_dab_pixels_BlendMode_Color (float * mask,
float * rgba_buffer, // b=bottom, premult
DabBounds *b,
float color_r, // }
float color_g, // }-- a=top, !premult
float color_b, // }
float opacity);
void draw_dab_pixels_BlendMode_Normal_and_Eraser (float * mask,
float * rgba,
DabBounds *b,
float * brushcolor,
float color_a,
float opacity,
float volume);
void draw_dab_pixels_BlendMode_LockAlpha (float *mask,
float *rgba,
DabBounds *b,
float * brushcolor,
float opacity,
float volume);
void draw_dab_pixels_BlendMode_Normal_Paint (float * mask,
float * rgba,
DabBounds *b,
float * brushcolor,
float opacity,
float volume);
void
draw_dab_pixels_BlendMode_Color (float * mask,
float * rgba,
DabBounds *b,
float color_r,
float color_g,
float color_b,
float opacity);
void
draw_dab_pixels_BlendMode_Posterize (float * mask,
float * rgba,
DabBounds *b,
float opacity,
uint16_t posterize,
uint16_t posterize_num);
void draw_dab_pixels_BlendMode_Normal_and_Eraser_Paint (float * mask,
float * rgba,
DabBounds *b,
float * brushcolor,
float color_a,
float opacity,
float volume);
void draw_dab_pixels_BlendMode_LockAlpha_Paint (float *mask,
float *rgba,
DabBounds *b,
float * brushcolor,
float opacity,
float volume);
void get_color_pixels_accumulate (float * mask,
float * rgba,
DabBounds *b,
float * sum_weight,
float * sum_color,
float paint
);
#endif // BRUSHMODES_H