Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/rct.c')
-rw-r--r--source/blender/blenlib/intern/rct.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index 0dc61db2342..48ba18515de 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -70,7 +70,16 @@ int BLI_in_rctf(rctf *rect, float x, float y)
void BLI_union_rctf(rctf *rct1, rctf *rct2)
{
+
+ if(rct1->xmin>rct2->xmin) rct1->xmin= rct2->xmin;
+ if(rct1->xmax<rct2->xmax) rct1->xmax= rct2->xmax;
+ if(rct1->ymin>rct2->ymin) rct1->ymin= rct2->ymin;
+ if(rct1->ymax<rct2->ymax) rct1->ymax= rct2->ymax;
+}
+void BLI_union_rcti(rcti *rct1, rcti *rct2)
+{
+
if(rct1->xmin>rct2->xmin) rct1->xmin= rct2->xmin;
if(rct1->xmax<rct2->xmax) rct1->xmax= rct2->xmax;
if(rct1->ymin>rct2->ymin) rct1->ymin= rct2->ymin;