68 #define ICON_SIZE_FROM_BUTRECT(rect) (0.8f * BLI_rcti_size_y(rect))
132 #define UI_BUT_UPDATE_DELAY ((void)0)
133 #define UI_BUT_UNDO ((void)0)
144 cp[0] = (int)((1.0f - fac) * cp[0] + fac * cpstate[0]);
145 cp[1] = (int)((1.0f - fac) * cp[1] + fac * cpstate[1]);
146 cp[2] = (int)((1.0f - fac) * cp[2] + fac * cpstate[2]);
156 const int facm = 255 - faci;
158 r_col[0] = (faci * col1[0] + facm * col2[0]) / 256;
159 r_col[1] = (faci * col1[1] + facm * col2[1]) / 256;
160 r_col[2] = (faci * col1[2] + facm * col2[2]) / 256;
161 r_col[3] = (faci * col1[3] + facm * col2[3]) / 256;
166 cp[0] =
clamp_i(cp[0] + tint, 0, 255);
167 cp[1] =
clamp_i(cp[1] + tint, 0, 255);
168 cp[2] =
clamp_i(cp[2] + tint, 0, 255);
176 const int delta = item_value - inner_value;
178 if (contrast > delta) {
183 if (contrast > -delta) {
191 float rgb[3], hsl[3];
235 #define WIDGET_CURVE_RESOLU 9
236 #define WIDGET_SIZE_MAX (WIDGET_CURVE_RESOLU * 4)
293 {0.468813, -0.481430},
294 {-0.155755, -0.352820},
295 {0.219306, -0.238501},
296 {-0.393286, -0.110949},
297 {-0.024699, 0.013908},
298 {0.343805, 0.147431},
299 {-0.272855, 0.269918},
300 {0.095909, 0.388710},
302 #define WIDGET_AA_JITTER UI_PIXEL_AA_JITTER
303 #define jit ui_pixel_jitter
306 {-0.352077, 0.532607},
307 {-0.352077, -0.549313},
308 {0.330000, -0.008353},
315 {0.382684, 0.923879},
316 {0.000001, 1.000000},
317 {-0.382683, 0.923880},
318 {-0.707107, 0.707107},
319 {-0.923879, 0.382684},
320 {-1.000000, 0.000000},
321 {-0.923880, -0.382684},
322 {-0.707107, -0.707107},
323 {-0.382683, -0.923880},
324 {0.000000, -1.000000},
325 {0.382684, -0.923880},
326 {0.707107, -0.707107},
327 {0.923880, -0.382684},
328 {1.000000, -0.000000},
329 {0.923880, 0.382683},
330 {0.707107, 0.707107},
360 {-0.578579, 0.253369},
361 {-0.392773, 0.412794},
362 {-0.004241, -0.328551},
363 {-0.003001, 0.034320},
364 {1.055313, 0.864744},
365 {0.866408, 1.026895},
375 #define OY (-0.2 / 2)
376 #define SC (0.35 * 2)
378 {-0.5 +
SC, 1.0 +
OY},
380 {0.5, 0.0 +
OY +
SC},
437 *
data |= corner_v << 2;
439 *
data |= color << 12;
440 *
data |= (inner) ? (1 << 10) : 0;
441 *
data |= (emboss) ? (1 << 11) : 0;
481 for (
int c = 0;
c < 4;
c++) {
494 for (
int c1 = 0, c2 = 3; c1 < 2; c1++, c2--) {
519 float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
const float color[4])
521 const float tri_arr[3][2] = {{x1,
y1}, {
x2, y2}, {x3, y3}};
554 const float f3 = 0.05 *
U.widget_unit;
555 const float f5 = 0.15 *
U.widget_unit;
556 const float f7 = 0.25 *
U.widget_unit;
561 else if (dir ==
't') {
606 for (
int i = 2; i <
length - 1; i++) {
645 float (*vert)[2],
const rcti *rect,
float rad,
int roundboxalign,
float step)
656 const float minx = rect->
xmin - step;
657 const float miny = rect->
ymin - step;
658 const float maxx = rect->
xmax + step;
659 const float maxy = rect->
ymax + step;
670 vert[tot][0] = minx + rad - vec[
a][0];
671 vert[tot][1] = maxy - vec[
a][1];
683 vert[tot][0] = minx + vec[
a][1];
684 vert[tot][1] = miny + rad - vec[
a][0];
696 vert[tot][0] = maxx - rad + vec[
a][0];
697 vert[tot][1] = miny + vec[
a][1];
709 vert[tot][0] = maxx - vec[
a][1];
710 vert[tot][1] = maxy - rad + vec[
a][0];
724 uiWidgetBase *wt,
int roundboxalign,
const rcti *rect,
float rad,
float radi)
727 const float minx = rect->
xmin, miny = rect->
ymin, maxx = rect->
xmax, maxy = rect->
ymax;
728 const float minxi = minx +
U.pixelsize;
729 const float maxxi = maxx -
U.pixelsize;
730 const float minyi = miny +
U.pixelsize;
731 const float maxyi = maxy -
U.pixelsize;
733 const float facxi = (maxxi != minxi) ? 1.0f / (maxxi - minxi) : 0.0f;
734 const float facyi = (maxyi != minyi) ? 1.0f / (maxyi - minyi) : 0.0f;
751 if (2.0f * rad > minsize) {
752 rad = 0.5f * minsize;
755 if (2.0f * (radi + 1.0f) > minsize) {
756 radi = 0.5f * minsize -
U.pixelsize;
781 wt->
inner_v[tot][0] = minxi + veci[
a][1];
782 wt->
inner_v[tot][1] = minyi + radi - veci[
a][0];
784 wt->
outer_v[tot][0] = minx + vec[
a][1];
785 wt->
outer_v[tot][1] = miny + rad - vec[
a][0];
807 wt->
inner_v[tot][0] = maxxi - radi + veci[
a][0];
808 wt->
inner_v[tot][1] = minyi + veci[
a][1];
810 wt->
outer_v[tot][0] = maxx - rad + vec[
a][0];
811 wt->
outer_v[tot][1] = miny + vec[
a][1];
835 wt->
inner_v[tot][0] = maxxi - veci[
a][1];
836 wt->
inner_v[tot][1] = maxyi - radi + veci[
a][0];
838 wt->
outer_v[tot][0] = maxx - vec[
a][1];
839 wt->
outer_v[tot][1] = maxy - rad + vec[
a][0];
861 wt->
inner_v[tot][0] = minxi + radi - veci[
a][0];
862 wt->
inner_v[tot][1] = maxyi - veci[
a][1];
864 wt->
outer_v[tot][0] = minx + rad - vec[
a][0];
865 wt->
outer_v[tot][1] = maxy - vec[
a][1];
906 const float verts[][2],
908 const uint tris[][3],
917 float centx = (
float)rect->
xmin + 0.4f * minsize;
918 float centy = (
float)rect->
ymin + 0.5f * minsize;
919 tria->
size = sizex = sizey = -0.5f * triasize * minsize;
922 centx = (
float)rect->
xmax - 0.4f * minsize;
925 else if (where ==
't') {
926 centx = (
float)rect->
xmin + 0.5f * minsize;
927 centy = (
float)rect->
ymax - 0.5f * minsize;
932 else if (where ==
'b') {
933 centx = (
float)rect->
xmin + 0.5f * minsize;
939 for (
int a = 0;
a < verts_tot;
a++) {
941 tria->
vec[
a][1] = sizey *
verts[
a][i2] + centy;
947 tria->
tot = tris_tot;
1012 for (
int i = 0; i < totvert; i++) {
1025 float centx, centy,
size;
1039 for (
int a = 0;
a < 6;
a++) {
1050 float centx, centy,
size;
1059 for (
int a = 0;
a < 6;
a++) {
1076 uchar coltop[4],
uchar coldown[4],
const uchar *color,
short shadetop,
short shadedown)
1078 coltop[0] =
CLAMPIS(color[0] + shadetop, 0, 255);
1079 coltop[1] =
CLAMPIS(color[1] + shadetop, 0, 255);
1080 coltop[2] =
CLAMPIS(color[2] + shadetop, 0, 255);
1081 coltop[3] = color[3];
1083 coldown[0] =
CLAMPIS(color[0] + shadedown, 0, 255);
1084 coldown[1] =
CLAMPIS(color[1] + shadedown, 0, 255);
1085 coldown[2] =
CLAMPIS(color[2] + shadedown, 0, 255);
1086 coldown[3] = color[3];
1094 for (
a = 0;
a < totvert;
a++) {
1112 const bool alpha_check,
1113 const float discard_factor)
1138 const uchar *outline,
1139 const uchar *emboss,
1141 const bool alpha_check)
1160 #define MAX_WIDGET_BASE_BATCH 6
1161 #define MAX_WIDGET_PARAMETERS 12
1171 const float checker_params[3] = {
1248 const float checker_params[3] = {
1262 bool show_alpha_checkers)
1264 uchar inner_col1[4] = {0};
1265 uchar inner_col2[4] = {0};
1266 uchar emboss_col[4] = {0};
1267 uchar outline_col[4] = {0};
1268 uchar tria_col[4] = {0};
1271 show_alpha_checkers =
false;
1278 inner_col1[0] = inner_col2[0] = wcol->
inner[0];
1279 inner_col1[1] = inner_col2[1] = wcol->
inner[1];
1280 inner_col1[2] = inner_col2[2] = wcol->
inner[2];
1281 inner_col1[3] = inner_col2[3] = wcol->
inner[3];
1290 outline_col[0] = wcol->
outline[0];
1291 outline_col[1] = wcol->
outline[1];
1292 outline_col[2] = wcol->
outline[2];
1293 outline_col[3] = wcol->
outline[3];
1302 tria_col[0] = wcol->
item[0];
1303 tria_col[1] = wcol->
item[1];
1304 tria_col[2] = wcol->
item[2];
1305 tria_col[3] = wcol->
item[3];
1309 if (inner_col1[3] || inner_col2[3] || outline_col[3] || emboss_col[3] || tria_col[3] ||
1310 show_alpha_checkers) {
1312 wtb, inner_col1, inner_col2, outline_col, emboss_col, tria_col, show_alpha_checkers);
1331 #define UI_TEXT_CLIP_MARGIN (0.25f * U.widget_unit / but->block->aspect)
1333 #define PREVIEW_PAD 4
1353 if (icon == ICON_NONE) {
1363 const int y = rect->
ymin + h / 2 -
size / 2;
1379 float xs = 0.0f, ys = 0.0f;
1393 const float aspect = but->
block->
aspect *
U.inv_dpi_fac;
1410 if (but->
a1 == 1.0f) {
1420 if (icon && icon != ICON_BLANK1) {
1421 const float ofs = 1.0f / aspect;
1426 but->
str && but->
str[0] ==
'\0') {
1427 xs = rect->
xmin + 2.0f * ofs;
1430 xs = rect->
xmin + 2.0f * ofs;
1433 xs = rect->
xmin + 4.0f * ofs;
1442 if (aspect > 0.95f && aspect < 1.05f) {
1443 xs = (int)(xs + 0.1f);
1444 ys = (int)(ys + 0.1f);
1448 uchar color[4] = {mono_color[0], mono_color[1], mono_color[2], mono_color[3]};
1478 const float aspect = but->
block->
aspect *
U.inv_dpi_fac;
1481 const int xs = rect->
xmax - tria_width;
1482 const int ys = (rect->
ymin + rect->
ymax - tria_height) / 2.0f;
1489 BLI_rctf_init(&tria_rect, xs, xs + tria_width, ys, ys + tria_height);
1501 const int bytes =
str + but->
ofs - prev_utf8;
1509 const int bytes = next_utf8 - (
str + but->
ofs);
1521 const size_t max_len,
1522 const float okwidth,
1525 const float sep_strwidth,
1526 size_t *r_final_len)
1535 memcpy(
str + l_end, sep, sep_len + 1);
1537 *r_final_len = (size_t)(l_end) + sep_len;
1545 *r_final_len = (size_t)l_end;
1564 const float minwidth,
1565 const size_t max_len,
1566 const char rpart_sep)
1585 if ((okwidth > 0.0f) && (strwidth > okwidth)) {
1587 const char sep[] = {0xe2, 0x80, 0xA6, 0x0};
1588 const int sep_len =
sizeof(sep) - 1;
1592 float rpart_width = 0.0f;
1593 size_t rpart_len = 0;
1594 size_t final_lpart_len;
1597 rpart = strrchr(
str, rpart_sep);
1600 rpart_len = strlen(rpart);
1602 okwidth -= rpart_width;
1603 strwidth -= rpart_width;
1605 if (okwidth < 0.0f) {
1608 memmove(
str, rpart, rpart_len + 1);
1610 okwidth += rpart_width;
1611 strwidth = rpart_width;
1616 const float parts_strwidth = (okwidth - sep_strwidth) / 2.0f;
1619 strcpy(rpart_buf, rpart);
1626 if (l_end < 10 ||
min_ff(parts_strwidth, strwidth - okwidth) < minwidth) {
1631 fstyle,
str, max_len, okwidth, sep, sep_len, sep_strwidth, &final_lpart_len);
1634 size_t r_offset, r_len;
1637 r_len = strlen(
str + r_offset) + 1;
1639 if (l_end + sep_len + r_len + rpart_len > max_len) {
1647 fstyle,
str, max_len, okwidth, sep, sep_len, sep_strwidth, &final_lpart_len);
1650 memmove(
str + l_end + sep_len,
str + r_offset, r_len);
1651 memcpy(
str + l_end, sep, sep_len);
1653 final_lpart_len = (size_t)(l_end + sep_len + r_len - 1);
1661 char *
c =
str + l_end + sep_len;
1662 memmove(
c,
c + 1, r_len);
1669 memcpy(
str + final_lpart_len, rpart, rpart_len + 1);
1670 okwidth += rpart_width;
1695 const size_t max_len =
sizeof(but->
drawstr);
1718 const size_t max_len =
sizeof(but->
drawstr);
1744 if (but->
ofs > but->
pos) {
1764 if (
width > okwidth - 20) {
1770 if (width < 20 && but->ofs > 0) {
1802 int drawstr_len = strlen(but->
drawstr);
1803 const char *cpend = but->
drawstr + drawstr_len;
1823 char *cpoin = strrchr(but->
drawstr,
':');
1825 if (cpoin && (cpoin < cpend - 2)) {
1831 const int bytes = cp2 - prev_utf8;
1835 memmove(cp2 - bytes, cp2, drawstr_len + 1);
1838 drawstr_len -= bytes;
1849 while ((but->
strwidth > okwidth) && (but->
ofs < 2)) {
1865 drawstr_len - but->
ofs,
1870 but->
drawstr[drawstr_len] = 0;
1878 #ifdef WITH_INPUT_IME
1879 static void widget_draw_text_ime_underline(
const uiFontStyle *fstyle,
1883 const wmIMEData *ime_data,
1884 const char *drawstr)
1888 int sel_start = ime_data->sel_start, sel_end = ime_data->sel_end;
1891 if (drawstr[0] != 0) {
1892 if (but->
pos >= but->
ofs) {
1900 fstyle->
uifont_id, drawstr + but->
ofs, ime_data->composite_len + but->
pos - but->
ofs);
1904 rect->
ymin + 6 *
U.pixelsize,
1910 if (sel_start != -1 && sel_end != -1) {
1911 sel_end -= sel_start;
1912 sel_start += but->
pos;
1914 if (sel_start >= but->
ofs) {
1924 rect->
ymin + 6 *
U.pixelsize,
1934 const size_t str_step_ofs,
1935 const rcti *glyph_step_bounds,
1936 const int UNUSED(glyph_advance_x),
1937 const rctf *glyph_bounds,
1938 const int glyph_bearing[2],
1943 if (ul_data[0] == (
int)str_step_ofs) {
1944 ul_data[1] = glyph_step_bounds->
xmin + glyph_bearing[0] +
1958 const char *drawstr = but->
drawstr;
1959 const char *drawstr_right =
NULL;
1960 bool use_right_only =
false;
1962 #ifdef WITH_INPUT_IME
1963 const wmIMEData *ime_data;
1997 drawstr_left_len = INT_MAX;
1999 #ifdef WITH_INPUT_IME
2001 ime_data = ui_but_ime_data_get(but);
2003 if (ime_data && ime_data->composite_len) {
2009 ime_data->str_composite,
2024 rcti but_cursor_shape;
2028 int selsta_draw, selwidth_draw;
2030 if (drawstr[0] != 0) {
2051 rect->
xmin + selsta_draw,
2052 rect->
ymin +
U.pixelsize,
2054 rect->
ymax -
U.pixelsize);
2061 but_pos_ofs = but->
pos;
2063 #ifdef WITH_INPUT_IME
2065 if (ime_data && ime_data->composite_len && ime_data->cursor_pos != -1) {
2066 but_pos_ofs += ime_data->cursor_pos;
2070 if (but->
pos >= but->
ofs) {
2072 if (drawstr[0] != 0) {
2089 but_cursor_shape.
xmin = (rect->
xmin +
t) -
U.pixelsize;
2090 but_cursor_shape.
ymin = rect->
ymin +
U.pixelsize;
2091 but_cursor_shape.
xmax = (rect->
xmin +
t) +
U.pixelsize;
2092 but_cursor_shape.
ymax = rect->
ymax -
U.pixelsize;
2096 but_cursor_shape.
xmin,
2097 but_cursor_shape.
ymin,
2098 but_cursor_shape.
xmax,
2099 but_cursor_shape.
ymax);
2104 #ifdef WITH_INPUT_IME
2105 if (ime_data && ime_data->composite_len) {
2107 if (but->
pos >= but->
ofs) {
2108 ui_but_ime_reposition(but, but_cursor_shape.
xmax + 5, but_cursor_shape.
ymin + 3,
false);
2112 widget_draw_text_ime_underline(fstyle, wcol, but, rect, ime_data, drawstr);
2122 ui_rasterpos_safe(
x,
y, but->aspect);
2123 transopts = ui_translate_buttons();
2130 if (drawstr_right) {
2131 drawstr_left_len = (drawstr_right - drawstr);
2137 #ifdef USE_NUMBUTS_LR_ALIGN
2142 drawstr_right = strrchr(drawstr + but->
ofs,
':');
2143 if (drawstr_right) {
2145 drawstr_left_len = (drawstr_right - drawstr - 1);
2147 while (*drawstr_right ==
' ') {
2153 drawstr_right = drawstr + but->
ofs;
2154 use_right_only =
true;
2159 if (!use_right_only) {
2161 int font_xofs, font_yofs;
2163 int drawlen = (drawstr_left_len == INT_MAX) ? strlen(drawstr + but->
ofs) :
2164 (drawstr_left_len - but->
ofs);
2180 const char *drawstr_ofs = drawstr + but->
ofs;
2185 const char *drawstr_end = drawstr_ofs + drawlen;
2188 const char *drawstr_menu = strchr(drawstr_ofs, keys[i]);
2189 if (drawstr_menu !=
NULL && drawstr_menu < drawstr_end) {
2190 ul_index = (int)(drawstr_menu - drawstr_ofs);
2196 if (ul_index != -1) {
2213 rect->
xmin + font_xofs + ul_data[1],
2214 rect->
ymin + font_yofs,
2228 if (drawstr_right) {
2257 rect->
xmax -= 0.2 * icon_size;
2263 float alpha_this =
alpha;
2267 if (!op_icon->highlighted) {
2268 alpha_this *= 0.75f;
2272 const int old_drawflags = but->
drawflag;
2277 rect->
xmax -= icon_size;
2327 no_text_padding =
true;
2350 icon_size -= text_size;
2354 rect->
ymin += text_size;
2360 rect->
ymin -= text_size;
2361 rect->
ymax -= icon_size;
2372 #ifdef USE_UI_TOOLBAR_HACK
2381 const float icon_size = icon_size_init / (but->
block->
aspect *
U.inv_dpi_fac);
2384 #ifdef USE_UI_TOOLBAR_HACK
2399 rect->
xmin += 0.3f *
U.widget_unit;
2404 rect->
xmin += 0.2f *
U.widget_unit;
2410 if (show_menu_icon) {
2415 #ifdef USE_UI_TOOLBAR_HACK
2422 if (!no_text_padding) {
2426 rect->
xmin += text_padding;
2431 rect->
xmin += text_padding;
2435 rect->
xmin += text_padding;
2438 rect->
xmax -= text_padding;
2446 rect->
xmin +=
U.pixelsize;
2449 rect->
xmax -=
U.pixelsize;
2467 else if (but->
drawstr[0] ==
'\0') {
2492 #undef UI_TEXT_CLIP_MARGIN
2511 wcol_theme_s.
outline[3] *= factor;
2512 wcol_theme_s.
inner[3] *= factor;
2514 wcol_theme_s.
item[3] *= factor;
2515 wcol_theme_s.
text[3] *= factor;
2516 wcol_theme_s.
text_sel[3] *= factor;
2578 if (color_blend !=
NULL) {
2593 if (color_blend !=
NULL) {
2607 const uchar red[4] = {255, 0, 0};
2644 if (color_blend !=
NULL) {
2779 if (radout == 0.0f) {
2788 rect1.
ymax -= radout;
2807 for (
int step = 1; step <= (int)radout; step++) {
2808 const float expfac =
sqrtf(step / radout);
2836 rect->
ymin -= 0.1f *
U.widget_unit;
2840 rect->
ymax += 0.1f *
U.widget_unit;
2874 const rcti *rect,
const float mx,
const float my,
float *r_val_rad,
float *r_val_dist)
2880 const float m_delta[2] = {mx - centx, my - centy};
2883 *r_val_dist = (dist_sq < (radius * radius)) ?
sqrtf(dist_sq) / radius : 1.0f;
2889 const ColorPicker *cpicker,
const rcti *rect,
const float *hsv,
float *r_xpos,
float *r_ypos)
2900 radius_t = (1.0f -
pow3f(1.0f - hsv[1]));
2906 const float rad =
clamp_f(radius_t, 0.0f, 1.0f) * radius;
2907 *r_xpos = centx +
cosf(-ang) * rad;
2908 *r_ypos = centy +
sinf(-ang) * rad;
2916 const float radstep = 2.0f * (
float)
M_PI / (
float)tot;
2922 float rgb[3], hsv[3], rgb_center[3];
2933 CLAMP(hsv[2], 0.0f, 1.0f);
2947 const float hsv_center[3] = {0.0f, 0.0f, hsv[2]};
2951 if (!is_color_gamma) {
2966 for (
int a = 0;
a <= tot;
a++, ang += radstep) {
2967 const float si =
sinf(ang);
2968 const float co =
cosf(ang);
2973 rect, centx + co * radius, centy + si * radius, hsv_ang, hsv_ang + 1);
2974 hsv_ang[2] = hsv[2];
2979 if (!is_color_gamma) {
3030 const int steps = 48;
3033 const float h = hsv[0], s = hsv[1],
v = hsv[2];
3034 float dx, dy, sx1, sx2, sy;
3042 hsv_to_rgb(h, 0.0, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]);
3043 hsv_to_rgb(h, 0.0, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]);
3044 hsv_to_rgb(h, 0.0, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]);
3045 hsv_to_rgb(h, 0.0, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]);
3048 hsv_to_rgb(0.0, s, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]);
3049 hsv_to_rgb(0.0, s, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]);
3050 hsv_to_rgb(0.0, s, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]);
3051 hsv_to_rgb(0.0, s, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]);
3054 hsv_to_rgb(0.0, 0.0,
v, &col1[0][0], &col1[0][1], &col1[0][2]);
3055 hsv_to_rgb(0.0, 0.333,
v, &col1[1][0], &col1[1][1], &col1[1][2]);
3056 hsv_to_rgb(0.0, 0.666,
v, &col1[2][0], &col1[2][1], &col1[2][2]);
3057 hsv_to_rgb(0.0, 1.0,
v, &col1[3][0], &col1[3][1], &col1[3][2]);
3060 hsv_to_rgb(0.0, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]);
3066 hsv_to_rgb(1.0, 0.0, 1.0, &col1[1][0], &col1[1][1], &col1[1][2]);
3072 hsv_to_rgb(1.0, 1.0, 0.0, &col1[2][0], &col1[2][1], &col1[2][2]);
3079 hsv_to_rgb(1.0, 1.0, 1.0, &col1[2][0], &col1[2][1], &col1[2][2]);
3095 for (dx = 0.0f; dx < 0.999f; dx +=
color_step) {
3107 hsv_to_rgb(h, dx, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]);
3108 hsv_to_rgb(h, dx, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]);
3109 hsv_to_rgb(h, dx, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]);
3110 hsv_to_rgb(h, dx, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]);
3113 hsv_to_rgb(dx_next, s, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]);
3114 hsv_to_rgb(dx_next, s, 0.333, &col1[1][0], &col1[1][1], &col1[1][2]);
3115 hsv_to_rgb(dx_next, s, 0.666, &col1[2][0], &col1[2][1], &col1[2][2]);
3116 hsv_to_rgb(dx_next, s, 1.0, &col1[3][0], &col1[3][1], &col1[3][2]);
3119 hsv_to_rgb(dx_next, 0.0,
v, &col1[0][0], &col1[0][1], &col1[0][2]);
3120 hsv_to_rgb(dx_next, 0.333,
v, &col1[1][0], &col1[1][1], &col1[1][2]);
3121 hsv_to_rgb(dx_next, 0.666,
v, &col1[2][0], &col1[2][1], &col1[2][2]);
3122 hsv_to_rgb(dx_next, 1.0,
v, &col1[3][0], &col1[3][1], &col1[3][2]);
3127 hsv_to_rgb(dx_next, 1.0, 1.0, &col1[0][0], &col1[0][1], &col1[0][2]);
3133 hsv_to_rgb(h, dx, 1.0, &col1[1][0], &col1[1][1], &col1[1][2]);
3139 hsv_to_rgb(h, 1.0, dx, &col1[2][0], &col1[2][1], &col1[2][2]);
3154 for (
a = 0;
a < 3;
a++, sy += dy) {
3180 const uiButHSVCube *hsv_but,
const rcti *rect,
const float *hsv,
float *r_xp,
float *r_yp)
3182 float x = 0.0f,
y = 0.0f;
3230 float x = 0.0f,
y = 0.0f;
3268 float rgb[3], hsv[3],
v;
3295 .outline = {0, 0, 0, 255},
3296 .inner = {128, 128, 128, 255},
3376 int roundboxalign_zone;
3390 rect_zone.
xmax = rect->
xmin + handle_width +
U.pixelsize;
3410 rect_zone.
xmin = rect->
xmax - handle_width -
U.pixelsize;
3429 rect_zone.
xmin = rect->
xmin + handle_width -
U.pixelsize;
3430 rect_zone.
xmax = rect->
xmax - handle_width +
U.pixelsize;
3447 rect->
xmin += textofs;
3448 rect->
xmax -= textofs;
3462 const float rad = wcol->
roundness *
U.widget_unit;
3483 int UNUSED(roundboxalign))
3511 bool outline =
false;
3564 if (wcol->
item[0] > 48) {
3565 wcol->
item[0] -= 48;
3567 if (wcol->
item[1] > 48) {
3568 wcol->
item[1] -= 48;
3570 if (wcol->
item[2] > 48) {
3571 wcol->
item[2] -= 48;
3573 wcol->
item[3] = 255;
3576 rcti slider_inset = *slider;
3577 slider_inset.
xmin += 0.05 *
U.widget_unit;
3578 slider_inset.
xmax -= 0.05 *
U.widget_unit;
3657 rcti rect_prog = *rect, rect_bar = *rect;
3664 const float value = but_progressbar->
progress;
3671 rect_bar.xmax = rect_bar.xmin +
w;
3696 uchar old_inner[3], old_outline[3];
3710 rect->
xmin = cent_x - radi;
3711 rect->
xmax = cent_x + radi;
3712 rect->
ymin = cent_y - radi;
3713 rect->
ymax = cent_y + radi;
3732 const float toffs = ofs * 0.75f;
3740 int roundboxalign_slider = roundboxalign;
3752 float factor, factor_ui;
3753 float factor_discard = 1.0f;
3757 factor = value / but->
softmax;
3764 factor_ui = factor *
width;
3766 if (factor_ui <= ofs) {
3770 factor_discard = factor_ui / ofs;
3772 else if (factor_ui <=
width - ofs) {
3775 rect1.
xmax = rect1.
xmin + factor_ui;
3779 factor_discard = factor;
3802 rect->
xmax -= toffs;
3803 rect->
xmin += toffs;
3808 #define SWATCH_KEYED_BORDER 3
3830 const float rad = wcol->
roundness *
U.widget_unit;
3855 const bool show_alpha_checkers = (wcol->
inner[3] < 255);
3873 bw += (bw < 0.5f) ? 0.5f : -0.5f;
3934 const float rad = wcol->
roundness *
U.widget_unit;
3948 const float rad = wcol->
roundness *
U.widget_unit;
3962 const float rad = wcol->
roundness *
U.widget_unit;
3970 wcol->
inner[3] *= 1.0f - back[3];
3986 int UNUSED(roundboxalign))
4011 wcol->
inner[3] *= fac;
4013 wcol->
item[3] *= fac;
4014 wcol->
text[3] *= fac;
4024 int UNUSED(roundboxalign))
4031 const float rad = wcol->
roundness *
U.widget_unit;
4040 int UNUSED(roundboxalign))
4043 rcti recttemp = *rect;
4049 if (text_before_widget) {
4074 const float offset = delta * 0.9;
4075 if (text_before_widget) {
4076 rect->
xmax = recttemp.
xmin - offset;
4079 rect->
xmin = recttemp.
xmax + offset;
4105 const uchar red[4] = {255, 0, 0};
4115 const float rad = wcol->
roundness *
U.widget_unit;
4131 if (but !=
NULL && but->
col[3]) {
4138 const float rad = wcol->
roundness *
U.widget_unit;
4151 const float rad = wcol->
roundness *
U.widget_unit;
4161 const float rad = wcol->
roundness *
U.widget_unit;
4174 const float rad = wcol->
roundness *
U.widget_unit;
4192 const float rad = wcol->
roundness *
U.widget_unit;
4199 uchar theme_col_tab_highlight[3];
4201 #ifdef USE_TAB_SHADED_HIGHLIGHT
4218 #ifdef USE_TAB_SHADED_HIGHLIGHT
4228 #ifdef USE_TAB_SHADED_HIGHLIGHT
4233 #ifndef USE_TAB_SHADED_HIGHLIGHT
4242 const float rad = wcol->
roundness *
U.widget_unit;
4460 rect->
ymax +=
U.pixelsize;
4463 rect->
xmin -=
U.pixelsize;
4532 switch (but->
type) {
4547 switch (but->
type) {
4562 switch (but->
type) {
4586 #ifdef USE_UI_TOOLBAR_HACK
4792 const int drawflag = but->
drawflag;
4816 bool use_alpha_blend =
false;
4819 use_alpha_blend =
true;
4828 #ifdef USE_UI_POPOVER_ONCE
4840 else if (wt->
draw) {
4844 if (use_alpha_blend) {
4848 wt->
text(fstyle, &wt->
wcol, but, rect);
4849 if (use_alpha_blend) {
4857 float draw_color[4];
4860 draw_color[0] = ((
float)color[0]) / 255.0f;
4861 draw_color[1] = ((
float)color[1]) / 255.0f;
4862 draw_color[2] = ((
float)color[2]) / 255.0f;
4863 draw_color[3] = 1.0f;
4902 float background[4];
4906 new_inner[0] = (new_inner[0] * new_inner[3]) + (background[0] * (1.0f - new_inner[3]));
4907 new_inner[1] = (new_inner[1] * new_inner[3]) + (background[1] * (1.0f - new_inner[3]));
4908 new_inner[2] = (new_inner[2] * new_inner[3]) + (background[2] * (1.0f - new_inner[3]));
4909 new_inner[3] = 1.0f;
4912 wt->
custom(
NULL, wcol, rect, 0, roundboxalign);
4922 const float unit_size,
4923 const float mval_origin[2])
4926 const float unit_half = unit_size / 2;
4927 const float cent_x = mval_origin ?
CLAMPIS(mval_origin[0],
4928 rect->
xmin + unit_size,
4929 rect->
xmax - unit_size) :
4954 const int sign = is_down ? 1 : -1;
4955 float y = is_down ? rect->
ymax : rect->
ymin;
4965 y =
y -
sign * round(
U.pixelsize * 1.41);
5015 const uchar col1[4],
5016 const uchar col2[4],
5019 const float radius_ext_scale = (0.5f / radius_ext);
5034 for (
int i = 0; i < subd; i++) {
5035 const float a = start + ((i) / (
float)(subd - 1)) *
angle;
5036 const float s =
sinf(
a);
5038 const float y1 = s * radius_int;
5039 const float y2 = s * radius_ext;
5043 const float fac = (
y1 + radius_ext) * radius_ext_scale;
5051 const float fac = (y2 + radius_ext) * radius_ext_scale;
5070 const float pie_radius_internal =
U.dpi_fac *
U.pie_menu_threshold;
5071 const float pie_radius_external =
U.dpi_fac * (
U.pie_menu_threshold + 7.0f);
5073 const int subd = 40;
5075 const float angle =
atan2f(pie_dir[1], pie_dir[0]);
5083 uchar col1[4], col2[4];
5090 (
float)(
M_PI * 2.0),
5091 pie_radius_internal,
5092 pie_radius_external,
5100 (
float)(
M_PI * 2.0),
5101 pie_radius_internal,
5102 pie_radius_external,
5111 uchar col1[4], col2[4];
5119 pie_radius_internal,
5120 pie_radius_external,
5129 pie_radius_internal,
5130 pie_radius_external,
5148 if (
U.pie_menu_confirm > 0 &&
5150 const float pie_confirm_radius =
U.dpi_fac * (pie_radius_internal +
U.pie_menu_confirm);
5151 const float pie_confirm_external =
U.dpi_fac *
5152 (pie_radius_internal +
U.pie_menu_confirm + 7.0f);
5158 pie_confirm_external,
5181 const float color[4])
5234 const rcti _rect = *rect;
5236 int max_hint_width = INT_MAX;
5237 int padding = 0.25f * row_height;
5248 rect->
xmin += row_height;
5277 if ((name_width + hint_width) > available_width) {
5279 max_hint_width = available_width * 0.40f;
5281 rect->
xmax = (hint_width < max_hint_width) ?
5282 (rect->
xmax - hint_width) :
5283 (rect->
xmin + (available_width - max_hint_width));
5287 BLI_assert(!
"Unknwon menu item separator type");
5299 const size_t max_len =
sizeof(drawstr);
5307 int xofs = 0, yofs = 0;
5314 .align = UI_STYLE_TEXT_LEFT,
5320 if (r_xmax !=
NULL) {
5321 *r_xmax = xofs + info.
width;
5350 const size_t max_len =
sizeof(hint_drawstr);
5353 BLI_strncpy(hint_drawstr, cpoin + 1,
sizeof(hint_drawstr));
5354 if (hint_drawstr[0] && (max_hint_width < INT_MAX)) {
5365 .align = UI_STYLE_TEXT_RIGHT,
5377 float font_dims[2] = {0.0f, 0.0f};
5385 rect->
ymin += text_size;
5395 trect.
xmax = trect.
xmin + font_dims[0] +
U.widget_unit / 2;
5396 trect.
ymin +=
U.widget_unit / 2;
5397 trect.
ymax = trect.
ymin + font_dims[1];
5405 const size_t max_len =
sizeof(drawstr);
5416 .align = UI_STYLE_TEXT_CENTER,
typedef float(TangentPoint)[2]
#define BLF_KERNING_DEFAULT
float BLF_width(int fontid, const char *str, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLF_width_and_height(int fontid, const char *str, size_t len, float *r_width, float *r_height) ATTR_NONNULL()
void BLF_draw(int fontid, const char *str, size_t len) ATTR_NONNULL(2)
#define BLF_DRAW_STR_DUMMY_MAX
size_t BLF_width_to_strlen(int fontid, const char *str, size_t len, float width, float *r_width) ATTR_NONNULL(2)
void BLF_disable(int fontid, int option)
void BLF_boundbox_foreach_glyph(int fontid, const char *str, size_t len, BLF_GlyphBoundsFn user_fn, void *user_data) ATTR_NONNULL(2)
void BLF_enable(int fontid, int option)
size_t BLF_width_to_rstrlen(int fontid, const char *str, size_t len, float width, float *r_width) ATTR_NONNULL(2)
void BLF_color4ubv(int fontid, const unsigned char rgba[4])
void BLF_position(int fontid, float x, float y, float z)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
MINLINE int round_fl_to_int(float a)
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE float clamp_f(float value, float min, float max)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE float pow3f(float x)
MINLINE int clamp_i(int value, int min, int max)
void rgb_to_hsv_v(const float rgb[3], float r_hsv[3])
#define rgba_float_args_set_ch(col, r, g, b, a)
void rgb_to_hsv_compat_v(const float rgb[3], float r_hsv[3])
MINLINE unsigned char rgb_to_grayscale_byte(const unsigned char rgb[3])
MINLINE float rgb_to_grayscale(const float rgb[3])
void hsl_to_rgb_v(const float hsl[3], float r_rgb[3])
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_b)
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])
void rgb_to_hsl_v(const float rgb[3], float r_hsl[3])
void rgb_uchar_to_float(float r_col[3], const unsigned char col_ub[3])
void rgb_float_to_uchar(unsigned char r_col[3], const float col_f[3])
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 copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
MINLINE void copy_v3_v3_uchar(unsigned char r[3], const unsigned char a[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void interp_v3_v3v3_uchar(unsigned char target[3], const unsigned char a[3], const unsigned char b[3], const float t)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE float BLI_rcti_cent_x_fl(const struct rcti *rct)
void BLI_rcti_translate(struct rcti *rect, int x, int y)
void BLI_rcti_resize(struct rcti *rect, int x, int y)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
BLI_INLINE float BLI_rcti_cent_y_fl(const struct rcti *rct)
BLI_INLINE int BLI_rcti_cent_y(const struct rcti *rct)
void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src)
void BLI_rctf_scale(rctf *rect, const float scale)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
int BLI_str_utf8_size(const char *p) ATTR_NONNULL()
char * BLI_str_find_prev_char_utf8(const char *str, const char *p) ATTR_NONNULL()
char * BLI_str_find_next_char_utf8(const char *p, const char *end) ATTR_NONNULL(1)
void rect_copy(int dst[2][2], int src[2][2])
void ED_node_socket_draw(struct bNodeSocket *sock, const struct rcti *rect, const float color[4], float scale)
void GPU_batch_draw_instanced(GPUBatch *batch, int i_count)
#define GPU_batch_uniform_4fv_array(batch, name, len, val)
void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id)
GPUBatch * GPU_batch_create_ex(GPUPrimType prim, GPUVertBuf *vert, GPUIndexBuf *elem, eGPUBatchFlag owns_flag)
void GPU_batch_draw(GPUBatch *batch)
#define GPU_batch_uniform_3fv(batch, name, val)
void gpu_batch_presets_register(struct GPUBatch *preset_batch)
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
GPUIndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
_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 GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_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 i1
_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 blue
_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
void GPU_matrix_pop(void)
void GPU_matrix_push(void)
void GPU_matrix_translate_2f(float x, float y)
@ GPU_SHADER_2D_SMOOTH_COLOR
@ GPU_SHADER_2D_UNIFORM_COLOR
@ GPU_SHADER_2D_WIDGET_BASE_INST
@ GPU_SHADER_2D_WIDGET_BASE
void GPU_blend(eGPUBlend blend)
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
#define GPU_vertbuf_create_with_format(format)
struct GPUVertBuf GPUVertBuf
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
void GPU_vertbuf_attr_get_raw_data(GPUVertBuf *, uint a_idx, GPUVertBufRaw *access)
Group RGB to Bright Vector Camera CLAMP
#define UI_ALPHA_CHECKER_LIGHT
@ UI_BUT_ALIGN_STITCH_TOP
@ UI_BUT_ANIMATED_CHANGED
@ UI_BUT_ALIGN_STITCH_LEFT
@ UI_EMBOSS_NONE_OR_STATUS
void UI_fontstyle_set(const struct uiFontStyle *fs)
void UI_fontstyle_draw_ex(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params, size_t len, int *r_xofs, int *r_yofs, struct ResultBLF *r_info)
void UI_draw_text_underline(int pos_x, int pos_y, int len, int height, const float color[4])
#define UI_ALPHA_CHECKER_DARK
void UI_but_drawflag_disable(uiBut *but, int flag)
void UI_fontstyle_draw(const struct uiFontStyle *fs, const struct rcti *rect, const char *str, const uchar col[4], const struct uiFontStyleDraw_Params *fs_params)
@ UI_BLOCK_THEME_STYLE_POPUP
bool UI_but_is_tool(const uiBut *but)
#define ICON_DEFAULT_HEIGHT
#define ICON_DEFAULT_HEIGHT_TOOLBAR
bool UI_icon_get_theme_color(int icon_id, unsigned char color[4])
void UI_icon_draw_preview(float x, float y, int icon_id, float aspect, float alpha, int size)
#define ICON_DEFAULT_WIDTH
void UI_icon_draw_ex(float x, float y, int icon_id, float aspect, float alpha, float desaturate, const uchar mono_color[4], const bool mono_border)
void UI_GetThemeColor3ubv(int colorid, unsigned char col[3])
int UI_ThemeMenuShadowWidth(void)
struct bTheme * UI_GetTheme(void)
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_GetThemeColor4ubv(int colorid, unsigned char col[4])
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
static CCL_NAMESPACE_BEGIN const double alpha
uiBut * ui_but_drag_multi_edit_get(uiBut *but)
double ui_but_value_get(uiBut *but)
void ui_block_cm_to_display_space_v3(uiBlock *block, float pixel[3])
void ui_window_to_block_fl(const ARegion *region, uiBlock *block, float *r_x, float *r_y)
bool ui_but_menu_draw_as_popover(const uiBut *but)
void ui_but_v3_get(uiBut *but, float vec[3])
void ui_draw_but_WAVEFORM(ARegion *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *recti)
void ui_draw_but_UNITVEC(uiBut *but, const uiWidgetColors *wcol, const rcti *rect)
void ui_draw_but_CURVE(ARegion *region, uiBut *but, const uiWidgetColors *wcol, const rcti *rect)
void ui_draw_but_IMAGE(ARegion *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *rect)
void ui_draw_but_TRACKPREVIEW(ARegion *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *recti)
void ui_draw_but_COLORBAND(uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *rect)
void ui_draw_but_CURVEPROFILE(ARegion *region, uiBut *but, const uiWidgetColors *wcol, const rcti *rect)
void ui_draw_but_HISTOGRAM(ARegion *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *recti)
void ui_draw_but_TAB_outline(const rcti *rect, float rad, uchar highlight[3], uchar highlight_fade[3])
void ui_draw_but_VECTORSCOPE(ARegion *UNUSED(region), uiBut *but, const uiWidgetColors *UNUSED(wcol), const rcti *recti)
int ui_but_menu_direction(uiBut *but)
void ui_but_text_password_hide(char password_str[UI_MAX_PASSWORD_STR], uiBut *but, const bool restore)
IconTextureDrawCall border
@ ROUNDBOX_TRIA_HOLD_ACTION_ARROW
void ui_perceptual_to_scene_linear_space(uiBut *but, float rgb[3])
void ui_color_picker_hsv_to_rgb(const float r_cp[3], float rgb[3])
#define UI_MENU_SUBMENU_PADDING
bool ui_block_is_pie_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
@ UI_PIE_DEGREES_RANGE_LARGE
void ui_scene_linear_to_perceptual_space(uiBut *but, float rgb[3])
bool ui_block_is_menu(const uiBlock *block) ATTR_WARN_UNUSED_RESULT
void ui_color_picker_rgb_to_hsv_compat(const float rgb[3], float r_cp[3])
@ UI_BLOCK_CONTAINS_SUBMENU_BUT
int ui_but_icon(const uiBut *but)
bool ui_but_is_popover_once_compat(const uiBut *but) ATTR_WARN_UNUSED_RESULT
bool ui_but_is_color_gamma(uiBut *but)
@ UI_SEARCH_FILTER_NO_MATCH
#define UI_PIXEL_AA_JITTER
@ UI_MENU_ITEM_SEPARATOR_NONE
@ UI_MENU_ITEM_SEPARATOR_HINT
@ UI_MENU_ITEM_SEPARATOR_SHORTCUT
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
PropertySubType RNA_property_subtype(PropertyRNA *prop)
uiWidgetColors wcol_pulldown
uiWidgetColors wcol_numslider
uiWidgetColors wcol_list_item
uiWidgetColors wcol_progress
uiWidgetColors wcol_menu_back
uiWidgetColors wcol_menu_item
uiWidgetColors wcol_toggle
uiWidgetColors wcol_regular
uiWidgetColors wcol_tooltip
uiWidgetColors wcol_option
uiWidgetStateColors wcol_state
uiWidgetColors wcol_radio
uiWidgetColors wcol_scroll
uiWidgetColors wcol_pie_menu
uiWidgetColors wcol_toolbar_item
struct PieMenuData pie_data
void(* drawextra)(const struct bContext *C, void *idv, void *arg1, void *arg2, rcti *rect)
eButGradientType gradient_type
struct uiHandleButtonData * active
uiButHandleHoldFunc hold_func
char drawstr[UI_MAX_DRAW_STR]
struct PropertyRNA * rnaprop
struct PointerRNA rnapoin
ccl_device_inline float2 fabs(const float2 &a)