forked from mypaint/libmypaint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
brushmodes.h
76 lines (65 loc) · 3.54 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
#ifndef BRUSHMODES_H
#define BRUSHMODES_H
#include <stdint.h>
void draw_dab_pixels_BlendMode_Normal (uint16_t * mask,
uint16_t * rgba,
uint16_t color_r,
uint16_t color_g,
uint16_t color_b,
uint16_t opacity);
void draw_dab_pixels_BlendMode_Normal_Paint (uint16_t * mask,
uint16_t * rgba,
uint16_t color_r,
uint16_t color_g,
uint16_t color_b,
uint16_t opacity);
void
draw_dab_pixels_BlendMode_Color (uint16_t *mask,
uint16_t *rgba, // b=bottom, premult
uint16_t color_r, // }
uint16_t color_g, // }-- a=top, !premult
uint16_t color_b, // }
uint16_t opacity);
void
draw_dab_pixels_BlendMode_Posterize (uint16_t *mask,
uint16_t *rgba, // b=bottom, premult
uint16_t posterize,
uint16_t posterize_num);
void draw_dab_pixels_BlendMode_Normal_and_Eraser (uint16_t * mask,
uint16_t * rgba,
uint16_t color_r,
uint16_t color_g,
uint16_t color_b,
uint16_t color_a,
uint16_t opacity);
void draw_dab_pixels_BlendMode_Normal_and_Eraser_Paint (uint16_t * mask,
uint16_t * rgba,
uint16_t color_r,
uint16_t color_g,
uint16_t color_b,
uint16_t color_a,
uint16_t opacity);
void draw_dab_pixels_BlendMode_LockAlpha (uint16_t * mask,
uint16_t * rgba,
uint16_t color_r,
uint16_t color_g,
uint16_t color_b,
uint16_t opacity);
void draw_dab_pixels_BlendMode_LockAlpha_Paint (uint16_t * mask,
uint16_t * rgba,
uint16_t color_r,
uint16_t color_g,
uint16_t color_b,
uint16_t opacity);
void get_color_pixels_accumulate (uint16_t * mask,
uint16_t * rgba,
float * sum_weight,
float * sum_r,
float * sum_g,
float * sum_b,
float * sum_a,
float paint,
uint16_t sample_interval,
float random_sample_rate
);
#endif // BRUSHMODES_H