140 painter->
brush = brush;
195 texco[0] = mapping->
xmin +
x * mapping->
xmax;
196 texco[1] = mapping->
ymin +
y * mapping->
ymax;
216 for (
x = 0;
x <
size;
x++, m++) {
220 *m = (
ushort)(65535.0f * res);
230 const ushort *tex_mask_old,
246 bool use_texture_old = (tex_mask_old !=
NULL);
254 for (
y = origy;
y < h;
y++) {
255 for (
x = origx;
x <
w;
x++) {
260 ushort *
b = tex_mask + (
y * diameter +
x);
261 ushort *
t = tex_mask_cur + (
y * diameter +
x);
263 if (!use_texture_old) {
269 if (use_texture_old) {
270 res = *(tex_mask_old + ((
y - origy + yt) * cache->
tex_mask_old_w + (
x - origx + xt)));
293 int destx, desty, srcx, srcy,
w, h, x1,
y1,
x2, y2;
307 maskibuf.
x = diameter;
308 maskibuf.
y = diameter;
316 desty = (int)
floorf(
tile->last_paintpos[1]) - (int)
floorf(
pos[1]) + (diameter / 2 - h / 2);
319 IMB_rectclip(&maskibuf, &maskibuf_old, &destx, &desty, &srcx, &srcy, &
w, &h);
327 x1 =
min_ii(destx, diameter);
330 y2 =
min_ii(desty + h, diameter);
333 if ((x1 <
x2) && (
y1 < y2)) {
335 painter,
tile, tex_mask_old, x1,
y1,
x2, y2, srcx, srcy, diameter);
343 if ((0 < x1) && (0 < diameter)) {
346 if ((
x2 < diameter) && (0 < diameter)) {
348 painter,
tile,
NULL,
x2, 0, diameter, diameter, 0, 0, diameter);
350 if ((x1 <
x2) && (0 <
y1)) {
353 if ((x1 <
x2) && (y2 < diameter)) {
389 scene, brush, use_color_correction, cache->
invert,
distance, pressure, brush_rgb, display);
401 float texco[3],
rgba[4];
460 bool use_texture_old = (oldtexibuf !=
NULL);
471 scene, brush, use_color_correction, cache->
invert, 0.0f, 1.0f, brush_rgb, display);
480 for (
y = origy;
y < h;
y++) {
481 for (
x = origx;
x <
w;
x++) {
483 float texco[3],
rgba[4];
485 if (!use_texture_old) {
507 if (use_texture_old) {
509 ((
y - origy + yt) * oldtexibuf->
x + (
x - origx + xt)) * 4;
528 if (use_texture_old) {
530 ((
y - origy + yt) * oldtexibuf->
x + (
x - origx + xt)) * 4;
565 ImBuf *oldtexibuf, *ibuf;
566 int imbflag, destx, desty, srcx, srcy,
w, h, x1,
y1,
x2, y2;
584 desty = (int)
floorf(
tile->last_paintpos[1]) - (int)
floorf(
pos[1]) + (diameter / 2 - h / 2);
597 y2 =
min_ii(desty + h, ibuf->
y);
600 if ((x1 <
x2) && (
y1 < y2)) {
609 if ((0 < x1) && (0 < ibuf->
y)) {
612 if ((x2 < ibuf->
x) && (0 < ibuf->
y)) {
615 if ((x1 <
x2) && (0 <
y1)) {
618 if ((x1 <
x2) && (y2 < ibuf->
y)) {
627 const float mouse[2],
632 float invh = 1.0f / (
float)
tile->canvas->
y;
636 start[0] =
pos[0] - diameter / 2.0f;
637 start[1] =
pos[1] - diameter / 2.0f;
641 float xmin, ymin, xmax, ymax;
644 s->
v2d, (start[0] + diameter) * invw, (start[1] + diameter) * invh, &xmax, &ymax);
647 mapping->
xmax = (xmax - xmin) / (
float)diameter;
648 mapping->
ymax = (ymax - ymin) / (
float)diameter;
649 mapping->
xmin = xmin + (
tile->uv_origin[0] *
tile->size[0] * mapping->
xmax);
650 mapping->
ymin = ymin + (
tile->uv_origin[1] *
tile->size[1] * mapping->
ymax);
654 mapping->
xmin = 2.0f * (start[0] * invw - 0.5f);
655 mapping->
ymin = 2.0f * (start[1] * invh - 0.5f);
656 mapping->
xmax = 2.0f * invw;
657 mapping->
ymax = 2.0f * invh;
661 mapping->
xmin = mouse[0] - diameter * 0.5f + 0.5f;
662 mapping->
ymin = mouse[1] - diameter * 0.5f + 0.5f;
663 mapping->
xmax = 1.0f;
664 mapping->
ymax = 1.0f;
667 mapping->
xmin = (int)(-diameter * 0.5) + (int)
floorf(
pos[0]) -
669 mapping->
ymin = (int)(-diameter * 0.5) + (int)
floorf(
pos[1]) -
671 mapping->
xmax = 1.0f;
672 mapping->
ymax = 1.0f;
680 const float mouse[2],
690 const int diameter =
MAX2(1,
size * 2) + 4;
692 bool do_random =
false;
693 bool do_partial_update =
false;
698 float tex_rotation = -brush->
mtex.
rot;
712 do_partial_update =
true;
720 bool renew_maxmask =
false;
721 bool do_partial_update_mask =
false;
727 renew_maxmask =
true;
730 do_partial_update_mask =
true;
731 renew_maxmask =
true;
735 do_partial_update_mask =
false;
736 renew_maxmask =
true;
746 if (do_partial_update_mask) {
767 if (do_partial_update) {
780 else if (do_partial_update) {
785 if ((dx != 0) || (dy != 0)) {
846 const float *rrgbf = ibuf->
rect_float + (ibuf->
x *
y +
x) * 4;
855 ImBuf *ibuf,
int x,
int y,
const bool is_torus,
const float rgb[4])
870 float map_alpha = (
rgb[3] == 0.0f) ? rrgbf[3] : rrgbf[3] /
rgb[3];
880 rrgb[0] = straight[0];
881 rrgb[1] = straight[1];
882 rrgb[2] = straight[2];
883 rrgb[3] = straight[3];
904 ImBuf *ibuf,
int x,
int y,
float *outrgb,
short paint_tile,
float w)
913 if (x < ibuf->
x &&
x >= 0 && y < ibuf->
y &&
y >= 0) {
931 const short paint_tile)
935 int x,
y, xi, yi, xo, yo, xk, yk;
937 int out_off[2], in_off[2], dim[2];
947 out_off[0] = out_off[1] = 0;
950 IMB_rectclip(ibuf, ibufb, &in_off[0], &in_off[1], &out_off[0], &out_off[1], &dim[0], &dim[1]);
952 if ((dim[0] == 0) || (dim[1] == 0)) {
960 for (
y = 0;
y < dim[1];
y++) {
961 for (
x = 0;
x < dim[0];
x++) {
969 if (xi < ibuf->
x && xi >= 0 && yi < ibuf->
y && yi >= 0) {
982 for (yk = 0; yk <
kernel->side; yk++) {
983 for (xk = 0; xk <
kernel->side; xk++) {
985 xi + xk -
kernel->pixel_len,
986 yi + yk -
kernel->pixel_len,
1005 float alpha =
rgba[3];
1021 xo = out_off[0] +
x;
1022 yo = out_off[1] +
y;
1031 region->
destx = destx;
1032 region->
desty = desty;
1033 region->
srcx = srcx;
1034 region->
srcy = srcy;
1044 int destx = region->
destx;
1045 int desty = region->
desty;
1046 int srcx = region->
srcx;
1047 int srcy = region->
srcy;
1050 int origw, origh,
w, h, tot = 0;
1054 destx = destx % dbuf->
x;
1058 srcx = srcx % sbuf->
x;
1064 desty = desty % dbuf->
y;
1068 srcy = srcy % sbuf->
y;
1079 IMB_rectclip(dbuf, sbuf, &destx, &desty, &srcx, &srcy, &
w, &h);
1085 ®ion[tot++], (destx +
w) % dbuf->
x, desty, (srcx +
w) % sbuf->
x, srcy, origw -
w, h);
1089 ®ion[tot++], destx, (desty + h) % dbuf->
y, srcx, (srcy + h) % sbuf->
y,
w, origh - h);
1093 (destx +
w) % dbuf->
x,
1094 (desty + h) % dbuf->
y,
1095 (srcx +
w) % sbuf->
x,
1096 (srcy + h) % sbuf->
y,
1112 for (
a = 0;
a < tot;
a++) {
1137 int w = ibufb->
x, h = ibufb->
y, destx = 0, desty = 0, srcx =
pos[0], srcy =
pos[1];
1140 IMB_rectclip(clonebuf, ibuf, &destx, &desty, &srcx, &srcy, &
w, &h);
1181 ipos[0] = (int)
floorf((
pos[0] - ibufb->
x / 2));
1182 ipos[1] = (int)
floorf((
pos[1] - ibufb->
y / 2));
1201 for (
int ty = tiley; ty <= tileh; ty++) {
1202 for (
int tx = tilex; tx <= tilew; tx++) {
1208 if (
tile->canvas->rect_float) {
1221 tile->cache.curve_mask_cache.curve_mask,
1222 tile->cache.tex_mask,
1268 const float lastpos[2],
1281 int bpos[2], blastpos[2], bliftpos[2];
1292 if (lastpos[0] ==
pos[0] && lastpos[1] ==
pos[1]) {
1308 frombuf = (clonebuf) ? clonebuf : ibufb;
1320 for (
a = 0;
a < tot;
a++) {
1332 int tilex, tiley, tilew, tileh;
1344 if (tiley == tileh) {
1346 s,
tile, ®ion[
a], frombuf, mask_max,
blend, tilex, tiley, tilew, tileh);
1352 data.region = ®ion[
a];
1353 data.frombuf = frombuf;
1354 data.mask_max = mask_max;
1370 tile->cache.curve_mask_cache.curve_mask,
1371 tile->cache.tex_mask,
1424 for (
int i = 0; i < s->
num_tiles; i++) {
1442 return (
pos[0] >= -brush[0]) && (
pos[0] <
size[0] + brush[0]) && (
pos[1] >= -brush[1]) &&
1443 (
pos[1] <
size[1] + brush[1]);
1448 coord[0] = (uv[0] -
tile->uv_origin[0]) *
tile->size[0];
1449 coord[1] = (uv[1] -
tile->uv_origin[1]) *
tile->size[1];
1453 const float prev_mval[2],
1454 const float mval[2],
1460 float new_uv[2], old_uv[2];
1474 float last_uv[2], start_uv[2];
1484 const float uv_brush_size[2] = {
1488 for (
int i = 0; i < s->
num_tiles; i++) {
1492 const int uv_size[2] = {1, 1};
1493 float local_new_uv[2], local_old_uv[2];
1506 float size = base_size *
tile->radius_fac;
1508 float new_coord[2], old_coord[2];
1535 tile->need_redraw =
true;
1574 for (
int i = 0; i < s->
num_tiles; i++) {
1634 bool had_redraw =
false;
1635 for (
int i = 0; i < s->
num_tiles; i++) {
1674 for (
int i = 0; i < s->
num_tiles; i++) {
1689 const float color[4],
1694 if (x_px >= ibuf->
x || x_px < 0 || y_px >= ibuf->
y || y_px < 0) {
1698 coordinate = ((size_t)y_px) * ibuf->
x + x_px;
1718 const float color[4],
1723 if (x_px >= ibuf->
x || x_px < 0 || y_px >= ibuf->
y || y_px < 0) {
1727 coordinate = ((size_t)y_px) * ibuf->
x + x_px;
1740 for (
int i = 0; i < s->
num_tiles; i++) {
1754 const float color[3],
1756 const float mouse_init[2],
1757 const float mouse_final[2],
1787 if (iuser ==
NULL) {
1792 iuser = &local_iuser;
1794 iuser->
tile = tile_number;
1808 *(((
char *)&color_b) + 3) = strength * 255;
1812 color_f[3] = strength;
1815 if (!mouse_final || !br) {
1820 for (x_px = 0; x_px < ibuf->
x; x_px++) {
1821 for (y_px = 0; y_px < ibuf->
y; y_px++) {
1823 ibuf->
rect_float + 4 * (((
size_t)y_px) * ibuf->
x + x_px),
1829 for (x_px = 0; x_px < ibuf->
x; x_px++) {
1830 for (y_px = 0; y_px < ibuf->
y; y_px++) {
1832 (
uchar *)(ibuf->
rect + ((
size_t)y_px) * ibuf->
x + x_px),
1845 int minx = ibuf->
x, miny = ibuf->
y, maxx = 0, maxy = 0;
1846 float pixel_color[4];
1854 if (x_px >= ibuf->
x || x_px < 0 || y_px > ibuf->
y || y_px < 0) {
1863 touched =
BLI_BITMAP_NEW(((
size_t)ibuf->
x) * ibuf->
y,
"bucket_fill_bitmap");
1865 coordinate = (((size_t)y_px) * ibuf->
x + x_px);
1871 int pixel_color_b = *(ibuf->
rect + coordinate);
1889 x_px = coordinate %
width;
1890 y_px = coordinate /
width;
1893 x_px - 1, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
1895 x_px - 1, y_px, ibuf, stack, touched, pixel_color, threshold_sq);
1897 x_px - 1, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
1899 x_px, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
1901 x_px, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
1903 x_px + 1, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
1905 x_px + 1, y_px, ibuf, stack, touched, pixel_color, threshold_sq);
1907 x_px + 1, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
1933 x_px = coordinate %
width;
1934 y_px = coordinate /
width;
1937 x_px - 1, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
1939 x_px - 1, y_px, ibuf, stack, touched, pixel_color, threshold_sq);
1941 x_px - 1, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
1943 x_px, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
1945 x_px, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
1947 x_px + 1, y_px - 1, ibuf, stack, touched, pixel_color, threshold_sq);
1949 x_px + 1, y_px, ibuf, stack, touched, pixel_color, threshold_sq);
1951 x_px + 1, y_px + 1, ibuf, stack, touched, pixel_color, threshold_sq);
1981 const bContext *
C,
Brush *br,
const float mouse_init[2],
const float mouse_final[2],
void *ps)
1993 float line_len_sq_inv, line_len;
2019 image_final[0] *= ibuf->
x;
2020 image_final[1] *= ibuf->
y;
2028 line_len_sq_inv = 1.0f / line_len;
2029 line_len =
sqrtf(line_len);
2037 for (x_px = 0; x_px < ibuf->
x; x_px++) {
2038 for (y_px = 0; y_px < ibuf->
y; y_px++) {
2044 f =
dot_v2v2(p, tangent) * line_len_sq_inv;
2049 f =
len_v2(p) / line_len;
2056 color_f[3] *= brush_alpha;
2058 ibuf->
rect_float + 4 * (((
size_t)y_px) * ibuf->
x + x_px),
2065 for (x_px = 0; x_px < ibuf->
x; x_px++) {
2066 for (y_px = 0; y_px < ibuf->
y; y_px++) {
2072 f =
dot_v2v2(p, tangent) * line_len_sq_inv;
2077 f =
len_v2(p) / line_len;
2085 ((
uchar *)&color_b)[3] *= brush_alpha;
2087 (
uchar *)(ibuf->
rect + ((
size_t)y_px) * ibuf->
x + x_px),
typedef float(TangentPoint)[2]
float BKE_brush_sample_masktex(const struct Scene *scene, struct Brush *br, const float point[2], 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], int thread, struct ImagePool *pool)
float BKE_brush_alpha_get(const struct Scene *scene, const struct Brush *brush)
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)
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)
bool BKE_image_has_packedfile(const struct Image *image)
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, eReportType type, const char *message)
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#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 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(int start, 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_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(PaintTileMap *paint_tile_map, struct Image *image, struct ImBuf *ibuf, struct ImageUser *iuser, int x_tile, int y_tile, unsigned short **r_mask, bool validate)
struct PaintTileMap * ED_image_paint_tile_map_get(void)
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)
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 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 x2
_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 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_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 Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
void UI_view2d_view_to_region_fl(const struct View2D *v2d, float x, float y, float *r_region_x, float *r_region_y) ATTR_NONNULL()
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SyclQueue void void size_t num_bytes SyclQueue void const char void *memory_device_pointer KernelContext int kernel
void IMB_freeImBuf(ImBuf *UNUSED(ibuf))
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
ccl_global const KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
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)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
T distance(const T &a, const T &b)
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken rgba("rgba", pxr::TfToken::Immortal)
static const pxr::TfToken rgb("rgb", pxr::TfToken::Immortal)
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 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 brush_painter_2d_tex_mapping(ImagePaintState *s, ImagePaintTile *tile, const int diameter, const float pos[2], const float mouse[2], int mapmode, rctf *mapping)
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 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)
void paint_curve_mask_cache_free_data(CurveMaskCache *curve_mask_cache)
void paint_curve_mask_cache_update(CurveMaskCache *curve_mask_cache, const Brush *brush, const int diameter, const float radius, const float cursor_position[2])
static void image_init(Image *ima, short source, short type)
CurveMaskCache curve_mask_cache
bool use_color_correction
struct ColorBand * gradient
char gradient_stroke_mode
Caching structure for curve mask.
ImagePaintTileState state
ImagePaintRegion * region
struct ToolSettings * toolsettings
ColorManagedDisplaySettings display_settings
struct ReportList * reports
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)