155 painter->
brush = brush;
216 texco[0] = mapping->
xmin +
x * mapping->
xmax;
217 texco[1] = mapping->
ymin +
y * mapping->
ymax;
237 for (
x = 0;
x <
size;
x++, m++) {
241 *m = (
ushort)(65535.0f * res);
251 const ushort *tex_mask_old,
267 bool use_texture_old = (tex_mask_old !=
NULL);
275 for (
y = origy;
y < h;
y++) {
276 for (
x = origx;
x <
w;
x++) {
281 ushort *b = tex_mask + (
y * diameter +
x);
282 ushort *
t = tex_mask_cur + (
y * diameter +
x);
284 if (!use_texture_old) {
290 if (use_texture_old) {
291 res = *(tex_mask_old + ((
y - origy + yt) * cache->
tex_mask_old_w + (
x - origx + xt)));
314 int destx, desty, srcx, srcy,
w, h, x1,
y1,
x2, y2;
328 maskibuf.
x = diameter;
329 maskibuf.
y = diameter;
340 IMB_rectclip(&maskibuf, &maskibuf_old, &destx, &desty, &srcx, &srcy, &
w, &h);
348 x1 =
min_ii(destx, diameter);
351 y2 =
min_ii(desty + h, diameter);
354 if ((x1 <
x2) && (
y1 < y2)) {
356 painter, tile, tex_mask_old, x1,
y1,
x2, y2, srcx, srcy, diameter);
364 if ((0 < x1) && (0 < diameter)) {
367 if ((
x2 < diameter) && (0 < diameter)) {
369 painter, tile,
NULL,
x2, 0, diameter, diameter, 0, 0, diameter);
371 if ((x1 <
x2) && (0 <
y1)) {
374 if ((x1 <
x2) && (y2 < diameter)) {
391 int offset = (int)
floorf(diameter / 2.0f);
407 const float hardness = 1.0f;
408 const float rotation = 0.0f;
422 for (
int y = 0;
y < diameter;
y++) {
423 for (
int x = 0;
x < diameter;
x++, m++) {
424 float total_samples = 0;
427 float pixel_xy[2] = {
x + (aa_step * i),
y + (aa_step * j)};
431 xy_rot[0] = co * pixel_xy[0] - si * pixel_xy[1];
432 xy_rot[1] = si * pixel_xy[0] + co * pixel_xy[1];
435 float p =
len / radius;
436 if (hardness < 1.0f) {
437 p = (p - hardness) / (1.0f - hardness);
439 CLAMP(p, 0.0f, 1.0f);
444 float hardness_factor = 3.0f * p * p - 2.0f * p * p * p;
446 total_samples +=
curve * hardness_factor;
449 *m = (
ushort)(total_samples * norm_factor);
483 scene, brush, use_color_correction, cache->
invert,
distance, pressure, brush_rgb, display);
495 float texco[3], rgba[4];
554 bool use_texture_old = (oldtexibuf !=
NULL);
565 scene, brush, use_color_correction, cache->
invert, 0.0f, 1.0f, brush_rgb, display);
574 for (
y = origy;
y < h;
y++) {
575 for (
x = origx;
x <
w;
x++) {
577 float texco[3], rgba[4];
579 if (!use_texture_old) {
601 if (use_texture_old) {
603 ((
y - origy + yt) * oldtexibuf->
x + (
x - origx + xt)) * 4;
622 if (use_texture_old) {
624 ((
y - origy + yt) * oldtexibuf->
x + (
x - origx + xt)) * 4;
659 ImBuf *oldtexibuf, *ibuf;
660 int imbflag, destx, desty, srcx, srcy,
w, h, x1,
y1,
x2, y2;
691 y2 =
min_ii(desty + h, ibuf->
y);
694 if ((x1 <
x2) && (
y1 < y2)) {
703 if ((0 < x1) && (0 < ibuf->
y)) {
706 if ((x2 < ibuf->
x) && (0 < ibuf->
y)) {
709 if ((x1 <
x2) && (0 <
y1)) {
712 if ((x1 <
x2) && (y2 < ibuf->
y)) {
720 const float startpos[2],
722 const float mouse[2],
726 float invw = 1.0f / (
float)canvas->
x;
727 float invh = 1.0f / (
float)canvas->
y;
728 int xmin, ymin, xmax, ymax;
732 ipos[0] = (int)
floorf((
pos[0] - diameter / 2) + 1.0f);
733 ipos[1] = (int)
floorf((
pos[1] - diameter / 2) + 1.0f);
739 s->
v2d, (ipos[0] + diameter) * invw, (ipos[1] + diameter) * invh, &xmax, &ymax);
742 mapping->
xmin = xmin;
743 mapping->
ymin = ymin;
744 mapping->
xmax = (xmax - xmin) / (
float)diameter;
745 mapping->
ymax = (ymax - ymin) / (
float)diameter;
749 mapping->
xmin = 2.0f * (ipos[0] * invw - 0.5f);
750 mapping->
ymin = 2.0f * (ipos[1] * invh - 0.5f);
751 mapping->
xmax = 2.0f * invw;
752 mapping->
ymax = 2.0f * invh;
756 mapping->
xmin = mouse[0] - diameter * 0.5f + 0.5f;
757 mapping->
ymin = mouse[1] - diameter * 0.5f + 0.5f;
758 mapping->
xmax = 1.0f;
759 mapping->
ymax = 1.0f;
764 mapping->
xmax = 1.0f;
765 mapping->
ymax = 1.0f;
773 const float mouse[2],
783 const int diameter =
MAX2(1,
size * 2) + 4;
785 bool do_random =
false;
786 bool do_partial_update =
false;
792 float tex_rotation = -brush->
mtex.
rot;
806 do_partial_update =
true;
820 bool renew_maxmask =
false;
821 bool do_partial_update_mask =
false;
827 renew_maxmask =
true;
830 do_partial_update_mask =
true;
831 renew_maxmask =
true;
835 do_partial_update_mask =
false;
836 renew_maxmask =
true;
855 if (do_partial_update_mask) {
881 if (do_partial_update) {
894 else if (do_partial_update) {
899 if ((dx != 0) || (dy != 0)) {
962 const float *rrgbf = ibuf->
rect_float + (ibuf->
x *
y +
x) * 4;
971 ImBuf *ibuf,
int x,
int y,
const bool is_torus,
const float rgb[4])
986 float map_alpha = (rgb[3] == 0.0f) ? rrgbf[3] : rrgbf[3] / rgb[3];
996 rrgb[0] = straight[0];
997 rrgb[1] = straight[1];
998 rrgb[2] = straight[2];
999 rrgb[3] = straight[3];
1020 ImBuf *ibuf,
int x,
int y,
float *outrgb,
short paint_tile,
float w)
1029 if (x < ibuf->
x &&
x >= 0 && y < ibuf->
y &&
y >= 0) {
1047 const short paint_tile)
1051 int x,
y, xi, yi, xo, yo, xk, yk;
1053 int out_off[2], in_off[2], dim[2];
1063 out_off[0] = out_off[1] = 0;
1066 IMB_rectclip(ibuf, ibufb, &in_off[0], &in_off[1], &out_off[0], &out_off[1], &dim[0], &dim[1]);
1068 if ((dim[0] == 0) || (dim[1] == 0)) {
1076 for (
y = 0;
y < dim[1];
y++) {
1077 for (
x = 0;
x < dim[0];
x++) {
1085 if (xi < ibuf->
x && xi >= 0 && yi < ibuf->
y && yi >= 0) {
1098 for (yk = 0; yk < kernel->
side; yk++) {
1099 for (xk = 0; xk < kernel->
side; xk++) {
1119 if (
fabsf(outrgb[0]) > threshold) {
1121 float alpha = rgba[3];
1122 rgba[3] = outrgb[3] =
mask;
1137 xo = out_off[0] +
x;
1138 yo = out_off[1] +
y;
1147 region->
destx = destx;
1148 region->
desty = desty;
1149 region->
srcx = srcx;
1150 region->
srcy = srcy;
1160 int destx = region->
destx;
1161 int desty = region->
desty;
1162 int srcx = region->
srcx;
1163 int srcy = region->
srcy;
1166 int origw, origh,
w, h, tot = 0;
1170 destx = destx % dbuf->
x;
1174 srcx = srcx % sbuf->
x;
1180 desty = desty % dbuf->
y;
1184 srcy = srcy % sbuf->
y;
1195 IMB_rectclip(dbuf, sbuf, &destx, &desty, &srcx, &srcy, &
w, &h);
1201 ®ion[tot++], (destx +
w) % dbuf->
x, desty, (srcx +
w) % sbuf->
x, srcy, origw -
w, h);
1205 ®ion[tot++], destx, (desty + h) % dbuf->
y, srcx, (srcy + h) % sbuf->
y,
w, origh - h);
1209 (destx +
w) % dbuf->
x,
1210 (desty + h) % dbuf->
y,
1211 (srcx +
w) % sbuf->
x,
1212 (srcy + h) % sbuf->
y,
1228 for (
a = 0;
a < tot;
a++) {
1253 int w = ibufb->
x, h = ibufb->
y, destx = 0, desty = 0, srcx =
pos[0], srcy =
pos[1];
1256 IMB_rectclip(clonebuf, ibuf, &destx, &desty, &srcx, &srcy, &
w, &h);
1297 ipos[0] = (int)
floorf((
pos[0] - ibufb->
x / 2));
1298 ipos[1] = (int)
floorf((
pos[1] - ibufb->
y / 2));
1317 for (
int ty = tiley; ty <= tileh; ty++) {
1318 for (
int tx = tilex; tx <= tilew; tx++) {
1384 const float lastpos[2],
1397 int bpos[2], blastpos[2], bliftpos[2];
1408 if (lastpos[0] ==
pos[0] && lastpos[1] ==
pos[1]) {
1417 liftpos[0] =
pos[0] - offset[0] * canvas->
x;
1418 liftpos[1] =
pos[1] - offset[1] * canvas->
y;
1424 frombuf = (clonebuf) ? clonebuf : ibufb;
1436 for (
a = 0;
a < tot;
a++) {
1448 int tilex, tiley, tilew, tileh;
1460 if (tiley == tileh) {
1462 s, tile, ®ion[
a], frombuf, mask_max,
blend, tilex, tiley, tilew, tileh);
1468 data.region = ®ion[
a];
1469 data.frombuf = frombuf;
1470 data.mask_max = mask_max;
1540 for (
int i = 0; i < s->
num_tiles; i++) {
1558 return (
pos[0] >= -brush[0]) && (
pos[0] <
size[0] + brush[0]) && (
pos[1] >= -brush[1]) &&
1559 (
pos[1] <
size[1] + brush[1]);
1569 const float prev_mval[2],
1570 const float mval[2],
1576 float new_uv[2], old_uv[2];
1590 float last_uv[2], start_uv[2];
1600 const float uv_brush_size[2] = {
1604 for (
int i = 0; i < s->
num_tiles; i++) {
1608 const int uv_size[2] = {1, 1};
1609 float local_new_uv[2], local_old_uv[2];
1624 float new_coord[2], old_coord[2];
1690 for (
int i = 0; i < s->
num_tiles; i++) {
1724 s->
tiles[tile_idx].
uv_origin[0] = ((tile->tile_number - 1001) % 10);
1725 s->
tiles[tile_idx].
uv_origin[1] = ((tile->tile_number - 1001) / 10);
1751 bool had_redraw =
false;
1752 for (
int i = 0; i < s->
num_tiles; i++) {
1791 for (
int i = 0; i < s->
num_tiles; i++) {
1806 const float color[4],
1811 if (x_px >= ibuf->
x || x_px < 0 || y_px >= ibuf->
y || y_px < 0) {
1815 coordinate = ((size_t)y_px) * ibuf->
x + x_px;
1835 const float color[4],
1840 if (x_px >= ibuf->
x || x_px < 0 || y_px >= ibuf->
y || y_px < 0) {
1844 coordinate = ((size_t)y_px) * ibuf->
x + x_px;
1857 for (
int i = 0; i < s->
num_tiles; i++) {
1872 const float color[3],
1874 const float mouse_init[2],
1875 const float mouse_final[2],
1905 if (iuser ==
NULL) {
1910 iuser = &local_iuser;
1912 iuser->
tile = tile_number;
1926 *(((
char *)&color_b) + 3) = strength * 255;
1930 color_f[3] = strength;
1933 if (!mouse_final || !br) {
1938 for (x_px = 0; x_px < ibuf->
x; x_px++) {
1939 for (y_px = 0; y_px < ibuf->
y; y_px++) {
1941 ibuf->
rect_float + 4 * (((
size_t)y_px) * ibuf->
x + x_px),
1947 for (x_px = 0; x_px < ibuf->
x; x_px++) {
1948 for (y_px = 0; y_px < ibuf->
y; y_px++) {
1950 (
uchar *)(ibuf->
rect + ((
size_t)y_px) * ibuf->
x + x_px),
1963 int minx = ibuf->
x, miny = ibuf->
y, maxx = 0, maxy = 0;
1964 float pixel_color[4];
1972 if (x_px >= ibuf->
x || x_px < 0 || y_px > ibuf->
y || y_px < 0) {
1981 touched =
BLI_BITMAP_NEW(((
size_t)ibuf->
x) * ibuf->
y,
"bucket_fill_bitmap");
1983 coordinate = (((size_t)y_px) * ibuf->
x + x_px);
1989 int pixel_color_b = *(ibuf->
rect + coordinate);
2007 x_px = coordinate %
width;
2008 y_px = coordinate /
width;
2011 x_px - 1, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
2013 x_px - 1, y_px, ibuf, stack, touched, pixel_color, threshold_sq);
2015 x_px - 1, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
2017 x_px, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
2019 x_px, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
2021 x_px + 1, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
2023 x_px + 1, y_px, ibuf, stack, touched, pixel_color, threshold_sq);
2025 x_px + 1, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
2051 x_px = coordinate %
width;
2052 y_px = coordinate /
width;
2055 x_px - 1, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
2057 x_px - 1, y_px, ibuf, stack, touched, pixel_color, threshold_sq);
2059 x_px - 1, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
2061 x_px, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
2063 x_px, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
2065 x_px + 1, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
2067 x_px + 1, y_px, ibuf, stack, touched, pixel_color, threshold_sq);
2069 x_px + 1, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
2099 const bContext *
C,
Brush *br,
const float mouse_init[2],
const float mouse_final[2],
void *ps)
2111 float line_len_sq_inv, line_len;
2137 image_final[0] *= ibuf->
x;
2138 image_final[1] *= ibuf->
y;
2146 line_len_sq_inv = 1.0f / line_len;
2147 line_len =
sqrtf(line_len);
2155 for (x_px = 0; x_px < ibuf->
x; x_px++) {
2156 for (y_px = 0; y_px < ibuf->
y; y_px++) {
2162 f =
dot_v2v2(p, tangent) * line_len_sq_inv;
2167 f =
len_v2(p) / line_len;
2174 color_f[3] *= brush_alpha;
2176 ibuf->
rect_float + 4 * (((
size_t)y_px) * ibuf->
x + x_px),
2183 for (x_px = 0; x_px < ibuf->
x; x_px++) {
2184 for (y_px = 0; y_px < ibuf->
y; y_px++) {
2190 f =
dot_v2v2(p, tangent) * line_len_sq_inv;
2195 f =
len_v2(p) / line_len;
2203 ((
uchar *)&color_b)[3] *= brush_alpha;
2205 (
uchar *)(ibuf->
rect + ((
size_t)y_px) * ibuf->
x + x_px),
typedef float(TangentPoint)[2]
float BKE_brush_alpha_get(const struct Scene *scene, const struct Brush *brush)
float BKE_brush_sample_masktex(const struct Scene *scene, struct Brush *br, const float point[2], const int thread, struct ImagePool *pool)
float BKE_brush_sample_tex_3d(const struct Scene *scene, const struct Brush *br, const float point[3], float rgba[4], const int thread, struct ImagePool *pool)
float BKE_brush_curve_strength_clamped(struct Brush *br, float p, const float len)
bool BKE_colorband_evaluate(const struct ColorBand *coba, float in, float out[4])
struct Scene * CTX_data_scene(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct SpaceImage * CTX_wm_space_image(const bContext *C)
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
bool BKE_image_has_packedfile(struct Image *image)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
struct ImagePool * BKE_image_pool_new(void)
void BKE_image_free_gputextures(struct Image *ima)
int BKE_image_get_tile_from_pos(struct Image *ima, const float uv[2], float r_uv[2], float r_ofs[2])
void BKE_imageuser_default(struct ImageUser *iuser)
void BKE_image_pool_free(struct ImagePool *pool)
struct Brush * BKE_paint_brush(struct Paint *paint)
void BKE_report(ReportList *reports, ReportType type, const char *message)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_NEW(_tot, _alloc_string)
#define BLI_BITMAP_SET(_bitmap, _index, _set)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int min_ii(int a, int b)
MINLINE int clamp_i(int value, int min, int max)
MINLINE void straight_uchar_to_premul_float(float result[4], const unsigned char color[4])
MINLINE void straight_to_premul_v4(float color[4])
void rgba_uchar_to_float(float r_col[4], const unsigned char col_ub[4])
void rgba_float_to_uchar(unsigned char r_col[4], const float col_f[4])
MINLINE void linearrgb_to_srgb_v3_v3(float srgb[3], const float linear[3])
MINLINE void linearrgb_to_srgb_uchar3(unsigned char srgb[3], const float linear[3])
void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
MINLINE void premul_float_to_straight_uchar(unsigned char *result, const float color[4])
MINLINE void blend_color_add_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_mix_float(float dst[4], const float src1[4], const float src2[4])
MINLINE void blend_color_mix_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4])
MINLINE void mul_v4_fl(float r[4], float f)
MINLINE void sub_v2_v2v2_int(int r[2], const int a[2], const int b[2])
MINLINE void add_v4_v4(float r[4], const float a[4])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE float len_squared_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_v3(float r[3], const float a[3])
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void zero_v4(float r[4])
MINLINE float len_squared_v4v4(const float a[4], const float b[4]) ATTR_WARN_UNUSED_RESULT
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
MINLINE float dot_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f)
void BLI_stack_pop(BLI_Stack *stack, void *dst) ATTR_NONNULL()
void BLI_stack_push(BLI_Stack *stack, const void *src) ATTR_NONNULL()
bool BLI_stack_is_empty(const BLI_Stack *stack) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLI_stack_free(BLI_Stack *stack) ATTR_NONNULL()
#define BLI_stack_new(esize, descr)
void BLI_task_parallel_range(const int start, const int stop, void *userdata, TaskParallelRangeFunc func, const TaskParallelSettings *settings)
BLI_INLINE void BLI_parallel_range_settings_defaults(TaskParallelSettings *settings)
void DEG_id_tag_update(struct ID *id, int flag)
@ BRUSH_PAINT_ANTIALIASING
@ BRUSH_GRADIENT_SPACING_CLAMP
@ BRUSH_GRADIENT_SPACING_REPEAT
Object is a sort of wrapper for general info.
#define MTEX_MAP_MODE_VIEW
#define MTEX_MAP_MODE_STENCIL
#define MTEX_MAP_MODE_RANDOM
void ED_imapaint_clear_partial_redraw(void)
#define ED_IMAGE_UNDO_TILE_SIZE
void * ED_image_paint_tile_find(struct ListBase *paint_tiles, struct Image *image, struct ImBuf *ibuf, struct ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool validate)
void ED_imapaint_dirty_region(struct Image *ima, struct ImBuf *ibuf, struct ImageUser *iuser, int x, int y, int w, int h, bool find_old)
struct ListBase * ED_image_paint_tile_list_get(void)
void ED_region_tag_redraw(struct ARegion *region)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
BLI_INLINE float IMB_colormanagement_get_luminance(const float rgb[3])
void IMB_colormanagement_scene_linear_to_display_v3(float pixel[3], struct ColorManagedDisplay *display)
struct ColorManagedDisplay * IMB_colormanagement_display_get_named(const char *name)
void IMB_float_from_rect(struct ImBuf *ibuf)
struct ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_rectclip(struct ImBuf *dbuf, const struct ImBuf *sbuf, int *destx, int *desty, int *srcx, int *srcy, int *width, int *height)
void IMB_rect_from_float(struct ImBuf *ibuf)
void IMB_freeImBuf(struct ImBuf *ibuf)
void IMB_rectblend_threaded(struct ImBuf *dbuf, const struct ImBuf *obuf, const struct ImBuf *sbuf, unsigned short *dmask, const unsigned short *curvemask, const unsigned short *texmask, float mask_max, int destx, int desty, int origx, int origy, int srcx, int srcy, int width, int height, IMB_BlendMode mode, bool accumulate)
void IMB_rectblend(struct ImBuf *dbuf, const struct ImBuf *obuf, const struct ImBuf *sbuf, unsigned short *dmask, const unsigned short *curvemask, const unsigned short *texmask, float mask_max, int destx, int desty, int origx, int origy, int srcx, int srcy, int width, int height, IMB_BlendMode mode, bool accumulate)
bool IMB_initImBuf(struct ImBuf *ibuf, unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_blend_color_byte(unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4], IMB_BlendMode mode)
void IMB_blend_color_float(float dst[4], const float src1[4], const float src2[4], IMB_BlendMode mode)
Contains defines and structs used throughout the imbuf module.
@ IMB_COLORMANAGE_IS_DATA
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void UI_view2d_view_to_region(const struct View2D *v2d, float x, float y, int *r_region_x, int *r_region_y) ATTR_NONNULL()
static CCL_NAMESPACE_BEGIN int aa_samples(Scene *scene, Object *object, ShaderEvalType type)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static CCL_NAMESPACE_BEGIN const double alpha
static void image_init(Image *ima, short source, short type)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
void paint_delete_blur_kernel(BlurKernel *kernel)
BlurKernel * paint_new_blur_kernel(Brush *br, bool proj)
void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, ImageUser *iuser, short texpaint)
void paint_brush_init_tex(Brush *brush)
bool paint_use_opacity_masking(Brush *brush)
void paint_brush_color_get(struct Scene *scene, struct Brush *br, bool color_correction, bool invert, float distance, float pressure, float color[3], struct ColorManagedDisplay *display)
void paint_brush_exit_tex(Brush *brush)
void imapaint_region_tiles(ImBuf *ibuf, int x, int y, int w, int h, int *tx, int *ty, int *tw, int *th)
static int paint_2d_torus_split_region(ImagePaintRegion region[4], ImBuf *dbuf, ImBuf *sbuf, short paint_tile)
static void brush_painter_mask_imbuf_update(BrushPainter *painter, ImagePaintTile *tile, const ushort *tex_mask_old, int origx, int origy, int w, int h, int xt, int yt, const int diameter)
static void paint_2d_fill_add_pixel_float(const int x_px, const int y_px, ImBuf *ibuf, BLI_Stack *stack, BLI_bitmap *touched, const float color[4], float threshold_sq)
struct ImagePaintRegion ImagePaintRegion
static float paint_2d_ibuf_add_if(ImBuf *ibuf, int x, int y, float *outrgb, short paint_tile, float w)
static void paint_2d_convert_brushco(ImBuf *ibufb, const float pos[2], int ipos[2])
@ PAINT2D_TILE_UNINITIALIZED
static void paint_2d_canvas_free(ImagePaintState *s)
struct BrushPainter BrushPainter
static void brush_painter_cache_2d_free(BrushPainterCache *cache)
static ushort * brush_painter_curve_mask_new(BrushPainter *painter, int diameter, float radius, const float pos[2])
static int paint_2d_op(void *state, ImagePaintTile *tile, const float lastpos[2], const float pos[2])
static ImBuf * brush_painter_imbuf_new(BrushPainter *painter, ImagePaintTile *tile, const int size, float pressure, float distance)
static ImBuf * paint_2d_lift_clone(ImBuf *ibuf, ImBuf *ibufb, const int *pos)
static void paint_2d_lift_soften(ImagePaintState *s, ImagePaintTile *tile, ImBuf *ibuf, ImBuf *ibufb, const int *pos, const short paint_tile)
static ImageUser * paint_2d_get_tile_iuser(ImagePaintState *s, int tile_number)
struct BrushPainterCache BrushPainterCache
static void paint_2d_do_making_brush(ImagePaintState *s, ImagePaintTile *tile, ImagePaintRegion *region, ImBuf *frombuf, float mask_max, short blend, int tilex, int tiley, int tilew, int tileh)
void paint_2d_bucket_fill(const bContext *C, const float color[3], Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
void paint_2d_gradient_fill(const bContext *C, Brush *br, const float mouse_init[2], const float mouse_final[2], void *ps)
static void brush_painter_imbuf_partial_update(BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const int diameter)
void paint_2d_stroke_done(void *ps)
static ushort * brush_painter_mask_ibuf_new(BrushPainter *painter, const int size)
static void paint_2d_ibuf_rgb_set(ImBuf *ibuf, int x, int y, const bool is_torus, const float rgb[4])
static bool paint_2d_ensure_tile_canvas(ImagePaintState *s, int i)
static BrushPainter * brush_painter_2d_new(Scene *scene, Brush *brush, bool invert)
struct Paint2DForeachData Paint2DForeachData
static void paint_2d_transform_mouse(View2D *v2d, const float in[2], float out[2])
static void paint_2d_lift_smear(ImBuf *ibuf, ImBuf *ibufb, int *pos, short paint_tile)
void paint_2d_stroke(void *ps, const float prev_mval[2], const float mval[2], const bool eraser, float pressure, float distance, float base_size)
void * paint_2d_new_stroke(bContext *C, wmOperator *op, int mode)
static void paint_2d_uv_to_coord(ImagePaintTile *tile, const float uv[2], float coord[2])
static void paint_2d_ibuf_rgb_get(ImBuf *ibuf, int x, int y, float r_rgb[4])
static void brush_painter_mask_imbuf_partial_update(BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const int diameter)
struct ImagePaintState ImagePaintState
static void paint_2d_op_foreach_do(void *__restrict data_v, const int iter, const TaskParallelTLS *__restrict UNUSED(tls))
static void brush_painter_2d_require_imbuf(Brush *brush, ImagePaintTile *tile, bool use_float, bool use_color_correction, bool invert)
static void paint_2d_set_region(ImagePaintRegion *region, int destx, int desty, int srcx, int srcy, int width, int height)
static int paint_2d_canvas_set(ImagePaintState *s)
static void brush_imbuf_tex_co(rctf *mapping, int x, int y, float texco[3])
static void paint_2d_ibuf_tile_convert(ImBuf *ibuf, int *x, int *y, short paint_tile)
void paint_2d_redraw(const bContext *C, void *ps, bool final)
struct ImagePaintTile ImagePaintTile
static bool is_inside_tile(const int size[2], const float pos[2], const float brush[2])
static void brush_painter_2d_refresh_cache(ImagePaintState *s, BrushPainter *painter, ImagePaintTile *tile, const float pos[2], const float mouse[2], float pressure, float distance, float size)
static void brush_painter_imbuf_update(BrushPainter *painter, ImagePaintTile *tile, ImBuf *oldtexibuf, int origx, int origy, int w, int h, int xt, int yt)
static void brush_painter_2d_tex_mapping(ImagePaintState *s, ImBuf *canvas, const int diameter, const float startpos[2], const float pos[2], const float mouse[2], int mapmode, rctf *mapping)
static void paint_2d_fill_add_pixel_byte(const int x_px, const int y_px, ImBuf *ibuf, BLI_Stack *stack, BLI_bitmap *touched, const float color[4], float threshold_sq)
bool use_color_correction
struct ColorBand * gradient
char gradient_stroke_mode
ImagePaintTileState state
ImagePaintRegion * region
struct ToolSettings * toolsettings
ColorManagedDisplaySettings display_settings
struct ReportList * reports
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
ccl_device_inline float distance(const float2 &a, const float2 &b)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)