diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-11 22:17:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-11 22:17:48 +0400 |
commit | a5127dba57490e0c0215e9cabfac1749585c53d1 (patch) | |
tree | 98911e5020e54806155e3a77db345f2b6882cb9f /source/blender/editors/screen/screen_ops.c | |
parent | 2070cd5d4929b969046492e55da34736a9d6304c (diff) |
vector versions of BLI_in_rctf / BLI_in_rcti, (BLI_in_rctf_v, BLI_in_rcti_v)
use where possible.
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 6be276dea14..547e7bc8e5a 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -524,15 +524,15 @@ static int actionzone_area_poll(bContext *C) return 0; } -AZone *is_in_area_actionzone(ScrArea *sa, int x, int y) +AZone *is_in_area_actionzone(ScrArea *sa, const int xy[2]) { AZone *az = NULL; for (az = sa->actionzones.first; az; az = az->next) { - if (BLI_in_rcti(&az->rect, x, y)) { + if (BLI_in_rcti_v(&az->rect, xy)) { if (az->type == AZONE_AREA) { /* no triangle intersect but a hotspot circle based on corner */ - int radius = (x - az->x1) * (x - az->x1) + (y - az->y1) * (y - az->y1); + int radius = (xy[0] - az->x1) * (xy[0] - az->x1) + (xy[1] - az->y1) * (xy[1] - az->y1); if (radius <= AZONESPOT * AZONESPOT) break; @@ -577,7 +577,7 @@ static void actionzone_apply(bContext *C, wmOperator *op, int type) static int actionzone_invoke(bContext *C, wmOperator *op, wmEvent *event) { - AZone *az = is_in_area_actionzone(CTX_wm_area(C), event->x, event->y); + AZone *az = is_in_area_actionzone(CTX_wm_area(C), &event->x); sActionzoneData *sad; /* quick escape */ |