36 uint *p = &data->
rect[(y * data->rect_size[1]) + x];
38 while (x++ != x_end) {
46 uint *p = &data->
rect[(y * data->rect_size[1]) + x];
48 while (x++ != x_end) {
52 uint col_u[4] = {0, 0, 0, 0};
53 for (
uint corner = 0; corner < 3; corner++) {
54 for (
uint chan = 0; chan < 4; chan++) {
55 col_u[chan] += data->smooth.color_u[corner][chan] *
uint(
w[corner] * 255.0f);
62 col.as_bytes[0] =
uchar(col_u[0] / 255);
63 col.as_bytes[1] =
uchar(col_u[1] / 255);
64 col.as_bytes[2] =
uchar(col_u[2] / 255);
65 col.as_bytes[3] =
uchar(col_u[3] / 255);
68 pt_step_fl[0] += 1.0f;
100 for (
int t = 0; t < coords_len; t += 1,
pos += 3,
col += 3) {
133 for (
int i = 0; i <
length; i++) {
134 float rgb[3], hsl[3];
138 hsl_to_rgb(hsl[0], hsl[1], 1.0f - hsl[2], &rgb[0], &rgb[1], &rgb[2]);
void BLI_bitmap_draw_2d_tri_v2i(const int p1[2], const int p2[2], const int p3[2], void(*callback)(int x, int x_end, int y, void *), void *user_data)
MINLINE int max_ii(int a, int b)
void hsl_to_rgb(float h, float s, float l, float *r_r, float *r_g, float *r_b)
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])
void barycentric_weights_v2_clamped(const float v1[2], const float v2[2], const float v3[2], const float co[2], float w[3])
#define ARRAY_SET_ITEMS(...)
#define UNPACK2_EX(pre, a, post)
#define UNPACK4_EX(pre, a, post)
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
Contains defines and structs used throughout the imbuf module.
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
draw_view in_light_buf[] float
struct ImBuf * IMB_allocImBuf(unsigned int, unsigned int, unsigned char, unsigned int)
static void tri_fill_flat(int x, int x_end, int y, void *user_data)
static void tri_fill_smooth(int x, int x_end, int y, void *user_data)
ImBuf * BKE_icon_geom_rasterize(const Icon_Geom *geom, const uint size_x, const uint size_y)
void BKE_icon_geom_invert_lightness(Icon_Geom *geom)
ccl_device_inline int rect_size(int4 rect)
unsigned char(* colors)[4]
unsigned char(* coords)[2]
ImBufByteBuffer byte_buffer
struct UserRasterInfo::@84 smooth