Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/intern/rct.c
| Show First 20 Lines • Show All 645 Lines • ▼ Show 20 Lines | |||||
| void BLI_rcti_pad(rcti *rect, int pad_x, int pad_y) | void BLI_rcti_pad(rcti *rect, int pad_x, int pad_y) | ||||
| { | { | ||||
| rect->xmin -= pad_x; | rect->xmin -= pad_x; | ||||
| rect->ymin -= pad_y; | rect->ymin -= pad_y; | ||||
| rect->xmax += pad_x; | rect->xmax += pad_x; | ||||
| rect->ymax += pad_y; | rect->ymax += pad_y; | ||||
| } | } | ||||
| void BLI_rctf_pad(rctf *rect, float pad_x, float pad_y) | |||||
| { | |||||
| rect->xmin -= pad_x; | |||||
| rect->ymin -= pad_y; | |||||
| rect->xmax += pad_x; | |||||
| rect->ymax += pad_y; | |||||
| } | |||||
| void BLI_rctf_resize_x(rctf *rect, float x) | void BLI_rctf_resize_x(rctf *rect, float x) | ||||
| { | { | ||||
| rect->xmin = BLI_rctf_cent_x(rect) - (x * 0.5f); | rect->xmin = BLI_rctf_cent_x(rect) - (x * 0.5f); | ||||
| rect->xmax = rect->xmin + x; | rect->xmax = rect->xmin + x; | ||||
| } | } | ||||
| void BLI_rctf_resize_y(rctf *rect, float y) | void BLI_rctf_resize_y(rctf *rect, float y) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 478 Lines • Show Last 20 Lines | |||||