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:
authorCampbell Barton <ideasman42@gmail.com>2012-07-15 04:29:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-15 04:29:56 +0400
commit7cc5af4ef3869f6a1d2766eb5643f94e2f540cfa (patch)
tree42c7e5d6179e20e479e8eae7792c7091cc9ffd31 /source/blender/blenlib/intern/rct.c
parentf8bf58e0f21c59c4440165fbad55b082846b6b54 (diff)
minor refactor for rect functions. more consistent naming.
Diffstat (limited to 'source/blender/blenlib/intern/rct.c')
-rw-r--r--source/blender/blenlib/intern/rct.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index bdca1bb51bd..658d45ad171 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -115,7 +115,7 @@ static int isect_segments(const int v1[2], const int v2[2], const int v3[2], con
}
}
-int BLI_segment_in_rcti(const rcti *rect, const int s1[2], const int s2[2])
+int BLI_rcti_isect_segment(const rcti *rect, const int s1[2], const int s2[2])
{
/* first do outside-bounds check for both points of the segment */
if (s1[0] < rect->xmin && s2[0] < rect->xmin) return 0;
@@ -150,7 +150,7 @@ int BLI_segment_in_rcti(const rcti *rect, const int s1[2], const int s2[2])
}
}
-void BLI_union_rctf(rctf *rct1, const rctf *rct2)
+void BLI_rctf_union(rctf *rct1, const rctf *rct2)
{
if (rct1->xmin > rct2->xmin) rct1->xmin = rct2->xmin;
if (rct1->xmax < rct2->xmax) rct1->xmax = rct2->xmax;
@@ -158,7 +158,7 @@ void BLI_union_rctf(rctf *rct1, const rctf *rct2)
if (rct1->ymax < rct2->ymax) rct1->ymax = rct2->ymax;
}
-void BLI_union_rcti(rcti *rct1, const rcti *rct2)
+void BLI_rcti_union(rcti *rct1, const rcti *rct2)
{
if (rct1->xmin > rct2->xmin) rct1->xmin = rct2->xmin;
if (rct1->xmax < rct2->xmax) rct1->xmax = rct2->xmax;
@@ -234,14 +234,14 @@ void BLI_rctf_do_minmax_v(struct rctf *rect, const float xy[2])
if (xy[1] > rect->ymax) rect->ymax = xy[1];
}
-void BLI_translate_rcti(rcti *rect, int x, int y)
+void BLI_rcti_translate(rcti *rect, int x, int y)
{
rect->xmin += x;
rect->ymin += y;
rect->xmax += x;
rect->ymax += y;
}
-void BLI_translate_rctf(rctf *rect, float x, float y)
+void BLI_rctf_translate(rctf *rect, float x, float y)
{
rect->xmin += x;
rect->ymin += y;
@@ -250,7 +250,7 @@ void BLI_translate_rctf(rctf *rect, float x, float y)
}
/* change width & height around the central location */
-void BLI_resize_rcti(rcti *rect, int x, int y)
+void BLI_rcti_resize(rcti *rect, int x, int y)
{
rect->xmin = rect->xmax = (rect->xmax + rect->xmin) / 2;
rect->ymin = rect->ymax = (rect->ymax + rect->ymin) / 2;
@@ -260,7 +260,7 @@ void BLI_resize_rcti(rcti *rect, int x, int y)
rect->ymax = rect->ymin + y;
}
-void BLI_resize_rctf(rctf *rect, float x, float y)
+void BLI_rctf_resize(rctf *rect, float x, float y)
{
rect->xmin = rect->xmax = (rect->xmax + rect->xmin) * 0.5f;
rect->ymin = rect->ymax = (rect->ymax + rect->ymin) * 0.5f;
@@ -270,7 +270,7 @@ void BLI_resize_rctf(rctf *rect, float x, float y)
rect->ymax = rect->ymin + y;
}
-int BLI_isect_rctf(const rctf *src1, const rctf *src2, rctf *dest)
+int BLI_rctf_isect(const rctf *src1, const rctf *src2, rctf *dest)
{
float xmin, xmax;
float ymin, ymax;
@@ -300,7 +300,7 @@ int BLI_isect_rctf(const rctf *src1, const rctf *src2, rctf *dest)
}
}
-int BLI_isect_rcti(const rcti *src1, const rcti *src2, rcti *dest)
+int BLI_rcti_isect(const rcti *src1, const rcti *src2, rcti *dest)
{
int xmin, xmax;
int ymin, ymax;
@@ -330,7 +330,7 @@ int BLI_isect_rcti(const rcti *src1, const rcti *src2, rcti *dest)
}
}
-void BLI_copy_rcti_rctf(rcti *tar, const rctf *src)
+void BLI_rcti_rctf_copy(rcti *tar, const rctf *src)
{
tar->xmin = floorf(src->xmin + 0.5f);
tar->xmax = floorf((src->xmax - src->xmin) + 0.5f);