diff options
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/rct.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index ad8443683f8..bf3c8730b01 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -635,6 +635,14 @@ void BLI_rcti_resize(rcti *rect, int x, int y) rect->ymax = rect->ymin + y; } +void BLI_rcti_pad(rcti *rect, int pad_x, int pad_y) +{ + rect->xmin -= pad_x; + rect->ymin -= pad_y; + rect->xmax += pad_x; + rect->ymax += pad_y; +} + void BLI_rctf_resize(rctf *rect, float x, float y) { rect->xmin = BLI_rctf_cent_x(rect) - (x * 0.5f); |