Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_handlers.c
| Context not available. | |||||
| /* relative position within box */ | /* relative position within box */ | ||||
| x = ((float)mx_fl - but->rect.xmin) / BLI_rctf_size_x(&but->rect); | x = ((float)mx_fl - but->rect.xmin) / BLI_rctf_size_x(&but->rect); | ||||
| y = ((float)my_fl - but->rect.ymin) / BLI_rctf_size_y(&but->rect); | y = ((float)my_fl - but->rect.ymin) / BLI_rctf_size_y(&but->rect); | ||||
| CLAMP(x, 0.0f, 1.0f); | CLAMP(x, 0.0001f, 1.0f); | ||||
| CLAMP(y, 0.0f, 1.0f); | CLAMP(y, 0.000001f, 1.0f); | ||||
| switch (hsv_but->gradient_type) { | switch (hsv_but->gradient_type) { | ||||
| case UI_GRAD_SV: | case UI_GRAD_SV: | ||||
| Context not available. | |||||