code cleanup: rename BLI_in_rctf() --> BLI_rctf_isect_pt(), to conform with our namin...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 23 Aug 2012 18:25:45 +0000 (18:25 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 23 Aug 2012 18:25:45 +0000 (18:25 +0000)
28 files changed:
source/blender/blenfont/intern/blf_glyph.c
source/blender/blenkernel/intern/mask_rasterize.c
source/blender/blenlib/BLI_rect.h
source/blender/blenlib/intern/rct.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/UI_view2d.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/mask/mask_select.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_clip/clip_graph_ops.c
source/blender/editors/space_clip/tracking_select.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/render/intern/source/shadbuf.c
source/blender/windowmanager/intern/wm_event_system.c

index 302edd8d5330b8bb19abe8d579e9a124dfc339f2..63225651e5bd791a0a632e1d2108bb0054d8f428 100644 (file)
@@ -437,13 +437,13 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
        y2 = y + g->pos_y - g->height;
 
        if (font->flags & BLF_CLIPPING) {
-               if (!BLI_in_rctf(&font->clip_rec, dx + font->pos[0], y1 + font->pos[1]))
+               if (!BLI_rctf_isect_pt(&font->clip_rec, dx + font->pos[0], y1 + font->pos[1]))
                        return 0;
-               if (!BLI_in_rctf(&font->clip_rec, dx + font->pos[0], y2 + font->pos[1]))
+               if (!BLI_rctf_isect_pt(&font->clip_rec, dx + font->pos[0], y2 + font->pos[1]))
                        return 0;
-               if (!BLI_in_rctf(&font->clip_rec, dx1 + font->pos[0], y2 + font->pos[1]))
+               if (!BLI_rctf_isect_pt(&font->clip_rec, dx1 + font->pos[0], y2 + font->pos[1]))
                        return 0;
-               if (!BLI_in_rctf(&font->clip_rec, dx1 + font->pos[0], y1 + font->pos[1]))
+               if (!BLI_rctf_isect_pt(&font->clip_rec, dx1 + font->pos[0], y1 + font->pos[1]))
                        return 0;
        }
 
index 48e55601469eaabc62a0771bdf53136d198e1d8f..eb96d6726b94250482b6653dd20f8a16d5268959 100644 (file)
@@ -1196,7 +1196,7 @@ static float maskrasterize_layer_isect(unsigned int *face, float (*cos)[3], cons
 
 BLI_INLINE unsigned int layer_bucket_index_from_xy(MaskRasterLayer *layer, const float xy[2])
 {
-       BLI_assert(BLI_in_rctf_v(&layer->bounds, xy));
+       BLI_assert(BLI_rctf_isect_pt_v(&layer->bounds, xy));
 
        return ( (unsigned int)((xy[0] - layer->bounds.xmin) * layer->buckets_xy_scalar[0])) +
               (((unsigned int)((xy[1] - layer->bounds.ymin) * layer->buckets_xy_scalar[1])) * layer->buckets_x);
@@ -1233,7 +1233,7 @@ static float layer_bucket_depth_from_xy(MaskRasterLayer *layer, const float xy[2
 float BKE_maskrasterize_handle_sample(MaskRasterHandle *mr_handle, const float xy[2])
 {
        /* can't do this because some layers may invert */
-       /* if (BLI_in_rctf_v(&mr_handle->bounds, xy)) */
+       /* if (BLI_rctf_isect_pt_v(&mr_handle->bounds, xy)) */
 
        const unsigned int layers_tot = mr_handle->layers_tot;
        unsigned int i;
@@ -1246,7 +1246,7 @@ float BKE_maskrasterize_handle_sample(MaskRasterHandle *mr_handle, const float x
                float value_layer;
 
                /* also used as signal for unused layer (when render is disabled) */
-               if (layer->alpha != 0.0f && BLI_in_rctf_v(&layer->bounds, xy)) {
+               if (layer->alpha != 0.0f && BLI_rctf_isect_pt_v(&layer->bounds, xy)) {
                        value_layer = 1.0f - layer_bucket_depth_from_xy(layer, xy);
 
                        switch (layer->falloff) {
index 43639b141e1940ce1a640404ed0a42deee2ec384..eb9915d6c9be3f966ffd2ba7cbaab93628c3fe38 100644 (file)
@@ -57,16 +57,16 @@ void BLI_rctf_interp(struct rctf *rect, const struct rctf *rect_a, const struct
 //void BLI_rcti_interp(struct rctf *rect, struct rctf *rect_a, struct rctf *rect_b, float fac);
 int  BLI_rctf_compare(const struct rctf *rect_a, const struct rctf *rect_b, const float limit);
 int  BLI_rcti_compare(const struct rcti *rect_a, const struct rcti *rect_b);
-int  BLI_in_rcti(const struct rcti *rect, const int x, const int y);
-int  BLI_in_rcti_v(const struct rcti *rect, const int xy[2]);
-int  BLI_in_rctf(const struct rctf *rect, const float x, const float y);
-int  BLI_in_rctf_v(const struct rctf *rect, const float xy[2]);
+int  BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest);
+int  BLI_rcti_isect(const struct rcti *src1, const struct rcti *src2, struct rcti *dest);
+int  BLI_rcti_isect_pt(const struct rcti *rect, const int x, const int y);
+int  BLI_rcti_isect_pt_v(const struct rcti *rect, const int xy[2]);
+int  BLI_rctf_isect_pt(const struct rctf *rect, const float x, const float y);
+int  BLI_rctf_isect_pt_v(const struct rctf *rect, const float xy[2]);
 int  BLI_rcti_isect_segment(const struct rcti *rect, const int s1[2], const int s2[2]);
 #if 0 /* NOT NEEDED YET */
 int  BLI_rctf_isect_segment(struct rcti *rect, int s1[2], int s2[2]);
 #endif
-int  BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest);
-int  BLI_rcti_isect(const struct rcti *src1, const struct rcti *src2, struct rcti *dest);
 void BLI_rctf_union(struct rctf *rctf1, const struct rctf *rctf2);
 void BLI_rcti_union(struct rcti *rcti1, const struct rcti *rcti2);
 void BLI_rcti_rctf_copy(struct rcti *dst, const struct rctf *src);
@@ -88,4 +88,4 @@ void print_rcti(const char *str, const struct rcti *rect);
 }
 #endif
 
-#endif
+#endif  /* __BLI_RECT_H__ */
index ac9ac39893bc5d1752f033aa63bfa59f04f875aa..225ede8a8ef0db3ff907d99e54a775eab47a5471 100644 (file)
@@ -58,7 +58,7 @@ int BLI_rctf_is_empty(const rctf *rect)
        return ((rect->xmax <= rect->xmin) || (rect->ymax <= rect->ymin));
 }
 
-int BLI_in_rcti(const rcti *rect, const int x, const int y)
+int BLI_rcti_isect_pt(const rcti *rect, const int x, const int y)
 {
        if (x < rect->xmin) return 0;
        if (x > rect->xmax) return 0;
@@ -74,7 +74,7 @@ int BLI_in_rcti(const rcti *rect, const int x, const int y)
  *
  * \return True if \a rect is empty.
  */
-int BLI_in_rcti_v(const rcti *rect, const int xy[2])
+int BLI_rcti_isect_pt_v(const rcti *rect, const int xy[2])
 {
        if (xy[0] < rect->xmin) return 0;
        if (xy[0] > rect->xmax) return 0;
@@ -83,7 +83,7 @@ int BLI_in_rcti_v(const rcti *rect, const int xy[2])
        return 1;
 }
 
-int BLI_in_rctf(const rctf *rect, const float x, const float y)
+int BLI_rctf_isect_pt(const rctf *rect, const float x, const float y)
 {
        if (x < rect->xmin) return 0;
        if (x > rect->xmax) return 0;
@@ -92,7 +92,7 @@ int BLI_in_rctf(const rctf *rect, const float x, const float y)
        return 1;
 }
 
-int BLI_in_rctf_v(const rctf *rect, const float xy[2])
+int BLI_rctf_isect_pt_v(const rctf *rect, const float xy[2])
 {
        if (xy[0] < rect->xmin) return 0;
        if (xy[0] > rect->xmax) return 0;
@@ -124,7 +124,7 @@ int BLI_rcti_isect_segment(const rcti *rect, const int s1[2], const int s2[2])
        if (s1[1] > rect->ymax && s2[1] > rect->ymax) return 0;
 
        /* if either points intersect then we definetly intersect */
-       if (BLI_in_rcti_v(rect, s1) || BLI_in_rcti_v(rect, s2)) {
+       if (BLI_rcti_isect_pt_v(rect, s1) || BLI_rcti_isect_pt_v(rect, s2)) {
                return 1;
        }
        else {
index 78ac729f16e2bba955a30c0fffdc1b70f9e9287d..b277d0eccb57096593d151e2254c6ebf09305321 100644 (file)
@@ -505,7 +505,7 @@ static short ok_bezier_region(KeyframeEditData *ked, BezTriple *bezt)
        if (ked->data) {
                short ok = 0;
                
-               #define KEY_CHECK_OK(_index) BLI_in_rctf_v(ked->data, bezt->vec[_index])
+               #define KEY_CHECK_OK(_index) BLI_rctf_isect_pt_v(ked->data, bezt->vec[_index])
                KEYFRAME_OK_CHECKS(KEY_CHECK_OK);
                #undef KEY_CHECK_OK
                
index c5f2ad4254b39cda27f24f5dc490876c255e4354..6f2952a1967c85d57a5330452d73d05ba86535c5 100644 (file)
@@ -825,7 +825,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], shor
                }
                
                /* do boundbox check first */
-               if (BLI_in_rcti(rect, x0, y0)) {
+               if (BLI_rcti_isect_pt(rect, x0, y0)) {
                        /* only check if point is inside */
                        if ( ((x0 - mval[0]) * (x0 - mval[0]) + (y0 - mval[1]) * (y0 - mval[1])) <= rad * rad) {
                                /* free stroke */
@@ -874,7 +874,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p, int mval[], int mvalo[], shor
                        }
                        
                        /* check that point segment of the boundbox of the eraser stroke */
-                       if (BLI_in_rcti(rect, x0, y0) || BLI_in_rcti(rect, x1, y1)) {
+                       if (BLI_rcti_isect_pt(rect, x0, y0) || BLI_rcti_isect_pt(rect, x1, y1)) {
                                /* check if point segment of stroke had anything to do with
                                 * eraser region  (either within stroke painted, or on its lines)
                                 *  - this assumes that linewidth is irrelevant
index 9ab024a8b76b5458c6c3ac5377b8a45cbdb15ad0..3a8f05a76f0423b7bc7fbcdc16a26538071aaf62 100644 (file)
@@ -120,8 +120,8 @@ enum {
 /* Macros:                                                             */
 
 /* test if mouse in a scrollbar (assume that scroller availability has been tested) */
-#define IN_2D_VERT_SCROLL(v2d, co)   (BLI_in_rcti_v(&v2d->vert, co))
-#define IN_2D_HORIZ_SCROLL(v2d, co)  (BLI_in_rcti_v(&v2d->hor,  co))
+#define IN_2D_VERT_SCROLL(v2d, co)   (BLI_rcti_isect_pt_v(&v2d->vert, co))
+#define IN_2D_HORIZ_SCROLL(v2d, co)  (BLI_rcti_isect_pt_v(&v2d->hor,  co))
 
 /* ------------------------------------------ */
 /* Type definitions:                          */
index 39567a5b00b4d2e65a7aeb262d649b05dc993c36..33a5a0729eea9d55eeb8df54622561bd51f90b39 100644 (file)
@@ -698,7 +698,7 @@ static int ui_but_mouse_inside_icon(uiBut *but, ARegion *ar, wmEvent *event)
                rect.xmax -= delta / 2;
        }
        
-       return BLI_in_rcti(&rect, x, y);
+       return BLI_rcti_isect_pt(&rect, x, y);
 }
 
 static int ui_but_start_drag(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
@@ -4918,7 +4918,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event)
 
 static int ui_but_contains_pt(uiBut *but, int mx, int my)
 {
-       return BLI_in_rctf(&but->rect, mx, my);
+       return BLI_rctf_isect_pt(&but->rect, mx, my);
 }
 
 static uiBut *ui_but_find_activated(ARegion *ar)
@@ -4994,7 +4994,7 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
        uiBlock *block;
        
        /* check if the mouse is in the region */
-       if (!BLI_in_rcti(&ar->winrct, x, y)) {
+       if (!BLI_rcti_isect_pt(&ar->winrct, x, y)) {
                for (block = ar->uiblocks.first; block; block = block->next)
                        block->auto_open = FALSE;
                
@@ -5033,7 +5033,7 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
                }
                
                /* check if in the rect */
-               if (!BLI_in_rcti(&mask_rct, mx, my)) 
+               if (!BLI_rcti_isect_pt(&mask_rct, mx, my)) 
                        return 0;
        }
        
@@ -5086,7 +5086,7 @@ static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y)
                /* CLIP_EVENTS prevents the event from reaching other blocks */
                if (block->flag & UI_BLOCK_CLIP_EVENTS) {
                        /* check if mouse is inside block */
-                       if (BLI_in_rctf(&block->rect, mx, my)) {
+                       if (BLI_rctf_isect_pt(&block->rect, mx, my)) {
                                break;
                        }
                }
@@ -6100,7 +6100,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
        ui_window_to_block(ar, block, &mx, &my);
 
        /* check if mouse is inside block */
-       inside = BLI_in_rctf(&block->rect, mx, my);
+       inside = BLI_rctf_isect_pt(&block->rect, mx, my);
 
        /* if there's an active modal button, don't check events or outside, except for search menu */
        but = ui_but_find_activated(ar);
@@ -6349,7 +6349,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
                                uiSafetyRct *saferct = block->saferct.first;
 
                                if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) && event->val == KM_PRESS) {
-                                       if (saferct && !BLI_in_rctf(&saferct->parent, event->x, event->y)) {
+                                       if (saferct && !BLI_rctf_isect_pt(&saferct->parent, event->x, event->y)) {
                                                if (block->flag & (UI_BLOCK_OUT_1))
                                                        menu->menuretval = UI_RETURN_OK;
                                                else
@@ -6382,9 +6382,9 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
                                                 * events we check all preceding block rects too to make
                                                 * arrow keys navigation work */
                                                if (event->type != MOUSEMOVE || saferct == block->saferct.first) {
-                                                       if (BLI_in_rctf(&saferct->parent, (float)event->x, (float)event->y))
+                                                       if (BLI_rctf_isect_pt(&saferct->parent, (float)event->x, (float)event->y))
                                                                break;
-                                                       if (BLI_in_rctf(&saferct->safety, (float)event->x, (float)event->y))
+                                                       if (BLI_rctf_isect_pt(&saferct->safety, (float)event->x, (float)event->y))
                                                                break;
                                                }
                                        }
index d3b8197447951fb43ea3358eccb96b94f46c9c14..67c0d04a79f6e18a554c1fb7abafff986386aa5c 100644 (file)
@@ -140,10 +140,10 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
        wmWindow *win = CTX_wm_window(C);
        ScrArea *sa;
        for (sa = win->screen->areabase.first; sa; sa = sa->next) {
-               if (BLI_in_rcti(&sa->totrct, mx, my)) {
+               if (BLI_rcti_isect_pt(&sa->totrct, mx, my)) {
                        if (sa->spacetype == SPACE_IMAGE) {
                                ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
-                               if (BLI_in_rcti(&ar->winrct, mx, my)) {
+                               if (BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
                                        SpaceImage *sima = sa->spacedata.first;
                                        int mval[2] = {mx - ar->winrct.xmin,
                                                       my - ar->winrct.ymin};
@@ -155,7 +155,7 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
                        }
                        else if (sa->spacetype == SPACE_NODE) {
                                ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
-                               if (BLI_in_rcti(&ar->winrct, mx, my)) {
+                               if (BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
                                        SpaceNode *snode = sa->spacedata.first;
                                        int mval[2] = {mx - ar->winrct.xmin,
                                                       my - ar->winrct.ymin};
@@ -167,7 +167,7 @@ static void eyedropper_color_sample_fl(bContext *C, Eyedropper *UNUSED(eye), int
                        }
                        else if (sa->spacetype == SPACE_CLIP) {
                                ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
-                               if (BLI_in_rcti(&ar->winrct, mx, my)) {
+                               if (BLI_rcti_isect_pt(&ar->winrct, mx, my)) {
                                        SpaceClip *sc = sa->spacedata.first;
                                        int mval[2] = {mx - ar->winrct.xmin,
                                                       my - ar->winrct.ymin};
index d0e66f532cca5e04080332be358affe097af7637..fa3e04d13518e7567c9c8f99f4347f4a3f125b9e 100644 (file)
@@ -979,7 +979,7 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
        short align = panel_aligned(sa, ar), dx = 0, dy = 0;
        
        /* first clip for window, no dragging outside */
-       if (!BLI_in_rcti_v(&ar->winrct, &event->x))
+       if (!BLI_rcti_isect_pt_v(&ar->winrct, &event->x))
                return;
 
        dx = (event->x - data->startx) & ~(PNL_GRID - 1);
index 8dee1ff6a13d7f2c9975b34274f1da1a447d89fb..96c1b00d46d4e1a0ee432e998f510bb3a9e7ec12 100644 (file)
@@ -899,7 +899,7 @@ int ui_searchbox_inside(ARegion *ar, int x, int y)
 {
        uiSearchboxData *data = ar->regiondata;
        
-       return(BLI_in_rcti(&data->bbox, x - ar->winrct.xmin, y - ar->winrct.ymin));
+       return(BLI_rcti_isect_pt(&data->bbox, x - ar->winrct.xmin, y - ar->winrct.ymin));
 }
 
 /* string validated to be of correct length (but->hardmax) */
@@ -935,13 +935,13 @@ void ui_searchbox_event(bContext *C, ARegion *ar, uiBut *but, wmEvent *event)
                        ui_searchbox_select(C, ar, but, 1);
                        break;
                case MOUSEMOVE:
-                       if (BLI_in_rcti(&ar->winrct, event->x, event->y)) {
+                       if (BLI_rcti_isect_pt(&ar->winrct, event->x, event->y)) {
                                rcti rect;
                                int a;
                                
                                for (a = 0; a < data->items.totitem; a++) {
                                        ui_searchbox_butrect(&rect, data, a);
-                                       if (BLI_in_rcti(&rect, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin)) {
+                                       if (BLI_rcti_isect_pt(&rect, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin)) {
                                                if (data->active != a + 1) {
                                                        data->active = a + 1;
                                                        ui_searchbox_select(C, ar, but, 0);
index 285306ce12f2bcfb8d2caa2930c5714de679f9af..ace427f65ab3c4ca2a81d95c11ac3cbd56a20f6f 100644 (file)
@@ -440,7 +440,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
                                /* TODO: handles? */
                                /* TODO: uw? */
 
-                               if (BLI_in_rctf_v(&rectf, point_deform->bezt.vec[1])) {
+                               if (BLI_rctf_isect_pt_v(&rectf, point_deform->bezt.vec[1])) {
                                        BKE_mask_point_select_set(point, mode == GESTURE_MODAL_SELECT);
                                        BKE_mask_point_select_set_handle(point, mode == GESTURE_MODAL_SELECT);
                                }
@@ -525,7 +525,7 @@ static int do_lasso_select_mask(bContext *C, int mcords[][2], short moves, short
                                                           point_deform->bezt.vec[1][0], point_deform->bezt.vec[1][1],
                                                           &screen_co[0], &screen_co[1]);
 
-                               if (BLI_in_rcti(&rect, screen_co[0], screen_co[1]) &&
+                               if (BLI_rcti_isect_pt(&rect, screen_co[0], screen_co[1]) &&
                                    BLI_lasso_is_point_inside(mcords, moves, screen_co[0], screen_co[1], INT_MAX))
                                {
                                        BKE_mask_point_select_set(point, select);
index 59310f9e675ca6de1ca1d8c6b3a6abf4769f1dc8..0bfe5d04e5e9da8ff1552549fab94be5a7d7b8e8 100644 (file)
@@ -161,7 +161,7 @@ void ED_area_overdraw_flush(ScrArea *sa, ARegion *ar)
                ys = (az->y1 + az->y2) / 2;
 
                /* test if inside */
-               if (BLI_in_rcti(&ar->winrct, xs, ys)) {
+               if (BLI_rcti_isect_pt(&ar->winrct, xs, ys)) {
                        az->do_draw = TRUE;
                }
        }
index d1458fec94b27d8a3e1bd412dd72756e67d77878..adffb97c16f19de833756b5f5febcdff6e9aac7e 100644 (file)
@@ -1267,7 +1267,7 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event)
                }
                if (sa) {
                        for (ar = sa->regionbase.first; ar; ar = ar->next) {
-                               if (BLI_in_rcti_v(&ar->winrct, &event->x))
+                               if (BLI_rcti_isect_pt_v(&ar->winrct, &event->x))
                                        scr->subwinactive = ar->swinid;
                        }
                }
index ed519dc626cb33ec7858fb4d9f8a774366499b05..823037a79031615aded2d47fb7a437dccfd4aab0 100644 (file)
@@ -521,7 +521,7 @@ static ScrArea *screen_areahascursor(bScreen *scr, int x, int y)
        ScrArea *sa = NULL;
        sa = scr->areabase.first;
        while (sa) {
-               if (BLI_in_rcti(&sa->totrct, x, y)) break;
+               if (BLI_rcti_isect_pt(&sa->totrct, x, y)) break;
                sa = sa->next;
        }
        
@@ -540,7 +540,7 @@ static int actionzone_area_poll(bContext *C)
                int y = win->eventstate->y;
                
                for (az = sa->actionzones.first; az; az = az->next)
-                       if (BLI_in_rcti(&az->rect, x, y))
+                       if (BLI_rcti_isect_pt(&az->rect, x, y))
                                return 1;
        }       
        return 0;
@@ -551,7 +551,7 @@ 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_v(&az->rect, xy)) {
+               if (BLI_rcti_isect_pt_v(&az->rect, xy)) {
                        if (az->type == AZONE_AREA) {
                                /* no triangle intersect but a hotspot circle based on corner */
                                int radius = (xy[0] - az->x1) * (xy[0] - az->x1) + (xy[1] - az->y1) * (xy[1] - az->y1);
index 223d90d404d1385b484c7f27fd164b15b346180c..d916ee299b6448fd21f1c147f06dd2bc23bc4811 100644 (file)
@@ -1615,7 +1615,7 @@ static int line_clip_rect2f(
                
                
                if (fabsf(l1[0] - l2[0]) < PROJ_GEOM_TOLERANCE) { /* this is a single point  (or close to)*/
-                       if (BLI_in_rctf_v(rect, l1)) {
+                       if (BLI_rctf_isect_pt_v(rect, l1)) {
                                copy_v2_v2(l1_clip, l1);
                                copy_v2_v2(l2_clip, l2);
                                return 1;
@@ -1643,7 +1643,7 @@ static int line_clip_rect2f(
                }
                
                if (fabsf(l1[1] - l2[1]) < PROJ_GEOM_TOLERANCE) { /* this is a single point  (or close to)*/
-                       if (BLI_in_rctf_v(rect, l1)) {
+                       if (BLI_rctf_isect_pt_v(rect, l1)) {
                                copy_v2_v2(l1_clip, l1);
                                copy_v2_v2(l2_clip, l2);
                                return 1;
@@ -1667,12 +1667,12 @@ static int line_clip_rect2f(
                /* Done with vertical lines */
                
                /* are either of the points inside the rectangle ? */
-               if (BLI_in_rctf_v(rect, l1)) {
+               if (BLI_rctf_isect_pt_v(rect, l1)) {
                        copy_v2_v2(l1_clip, l1);
                        ok1 = 1;
                }
                
-               if (BLI_in_rctf_v(rect, l2)) {
+               if (BLI_rctf_isect_pt_v(rect, l2)) {
                        copy_v2_v2(l2_clip, l2);
                        ok2 = 1;
                }
@@ -1820,7 +1820,7 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s
         * this is even less work then an intersection test
         */
 #if 0
-       if (BLI_in_rctf_v(bucket_bounds, cent))
+       if (BLI_rctf_isect_pt_v(bucket_bounds, cent))
                return 1;
 #endif
        
@@ -1987,9 +1987,9 @@ static void project_bucket_clip_face(
        float bucket_bounds_ss[4][2];
 
        /* get the UV space bounding box */
-       inside_bucket_flag |= BLI_in_rctf_v(bucket_bounds, v1coSS);
-       inside_bucket_flag |= BLI_in_rctf_v(bucket_bounds, v2coSS) << 1;
-       inside_bucket_flag |= BLI_in_rctf_v(bucket_bounds, v3coSS) << 2;
+       inside_bucket_flag |= BLI_rctf_isect_pt_v(bucket_bounds, v1coSS);
+       inside_bucket_flag |= BLI_rctf_isect_pt_v(bucket_bounds, v2coSS) << 1;
+       inside_bucket_flag |= BLI_rctf_isect_pt_v(bucket_bounds, v3coSS) << 2;
        
        if (inside_bucket_flag == ISECT_ALL3) {
                /* all screenspace points are inside the bucket bounding box, this means we don't need to clip and can simply return the UVs */
@@ -2816,7 +2816,7 @@ static int project_bucket_face_isect(ProjPaintState *ps, int bucket_x, int bucke
        fidx = mf->v4 ? 3 : 2;
        do {
                v = ps->screenCoords[(*(&mf->v1 + fidx))];
-               if (BLI_in_rctf_v(&bucket_bounds, v)) {
+               if (BLI_rctf_isect_pt_v(&bucket_bounds, v)) {
                        return 1;
                }
        } while (fidx--);
index e94b28d22fa2816a03f14652e0ef5e60e679e870..71dcd32688754e8745e5884647d1f80598aaad81 100644 (file)
@@ -321,7 +321,7 @@ static void border_select_cb(void *userdata, MovieTrackingTrack *UNUSED(track),
 {
        BorderSelectuserData *data = (BorderSelectuserData *) userdata;
 
-       if (BLI_in_rctf(&data->rect, scene_framenr, val)) {
+       if (BLI_rctf_isect_pt(&data->rect, scene_framenr, val)) {
                int flag = 0;
 
                if (coord == 0)
index 5a79e832ebe24d4ecb711d1abaafc6fbb2093d25..507e492497de16f904f9d103883419df98bcff10 100644 (file)
@@ -363,7 +363,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
                        MovieTrackingMarker *marker = BKE_tracking_marker_get(track, framenr);
 
                        if (MARKER_VISIBLE(sc, track, marker)) {
-                               if (BLI_in_rctf_v(&rectf, marker->pos)) {
+                               if (BLI_rctf_isect_pt_v(&rectf, marker->pos)) {
                                        if (mode == GESTURE_MODAL_SELECT)
                                                BKE_tracking_track_flag_set(track, TRACK_AREA_ALL, SELECT);
                                        else
@@ -441,7 +441,7 @@ static int do_lasso_select_marker(bContext *C, int mcords[][2], short moves, sho
                                /* marker in screen coords */
                                ED_clip_point_stable_pos__reverse(sc, ar, marker->pos, screen_co);
 
-                               if (BLI_in_rcti(&rect, screen_co[0], screen_co[1]) &&
+                               if (BLI_rcti_isect_pt(&rect, screen_co[0], screen_co[1]) &&
                                    BLI_lasso_is_point_inside(mcords, moves, screen_co[0], screen_co[1], V2D_IS_CLIPPED))
                                {
                                        if (select)
index 019628535560d05f580bb1f195bd0dfabb2168a1..ff7a71af8c209cdabf434fb105236c217087a7d6 100644 (file)
@@ -327,7 +327,7 @@ static int file_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
        rect.xmin = rect.xmax = event->mval[0];
        rect.ymin = rect.ymax = event->mval[1];
 
-       if (!BLI_in_rcti(&ar->v2d.mask, rect.xmin, rect.ymin))
+       if (!BLI_rcti_isect_pt(&ar->v2d.mask, rect.xmin, rect.ymin))
                return OPERATOR_CANCELLED;
 
        /* single select, deselect all selected first */
@@ -525,7 +525,7 @@ int file_highlight_set(SpaceFile *sfile, ARegion *ar, int mx, int my)
        mx -= ar->winrct.xmin;
        my -= ar->winrct.ymin;
 
-       if (BLI_in_rcti(&ar->v2d.mask, mx, my)) {
+       if (BLI_rcti_isect_pt(&ar->v2d.mask, mx, my)) {
                float fx, fy;
                int active_file;
 
index 125d5e3be7733daeecb30d604c21c495dc2e10a2..8a1f0e5b611261b8720b9934929a95c93f15a9a9 100644 (file)
@@ -454,7 +454,7 @@ static int node_resize_area_default(bNode *node, int x, int y)
                rctf totr = node->totr;
                /* right part of node */
                totr.xmin = node->totr.xmax - 20.0f;
-               if (BLI_in_rctf(&totr, x, y))
+               if (BLI_rctf_isect_pt(&totr, x, y))
                        return NODE_RESIZE_RIGHT;
                else
                        return 0;
index 0f559b0cbfc410455c684cfb7eb8131519148c2f..f1a91df6f533c6207e18d737a8e9e36c757e321f 100644 (file)
@@ -476,12 +476,12 @@ void node_update_default(const bContext *C, bNodeTree *ntree, bNode *node)
 
 int node_select_area_default(bNode *node, int x, int y)
 {
-       return BLI_in_rctf(&node->totr, x, y);
+       return BLI_rctf_isect_pt(&node->totr, x, y);
 }
 
 int node_tweak_area_default(bNode *node, int x, int y)
 {
-       return BLI_in_rctf(&node->totr, x, y);
+       return BLI_rctf_isect_pt(&node->totr, x, y);
 }
 
 int node_get_colorid(bNode *node)
@@ -989,7 +989,7 @@ void node_set_cursor(wmWindow *win, SpaceNode *snode)
                else {
                        /* check nodes front to back */
                        for (node = ntree->nodes.last; node; node = node->prev) {
-                               if (BLI_in_rctf(&node->totr, snode->cursor[0], snode->cursor[1]))
+                               if (BLI_rctf_isect_pt(&node->totr, snode->cursor[0], snode->cursor[1]))
                                        break;  /* first hit on node stops */
                        }
                        if (node) {
index 382c02c8765e1029e2ecd99778b4ba9b9c4be718..fbae8b17ebfa171418fa9f7cdd96fbece0c94ef4 100644 (file)
@@ -1037,11 +1037,11 @@ static int UNUSED_FUNCTION(node_mouse_groupheader) (SpaceNode * snode)
 // XXX areamouseco_to_ipoco(G.v2d, mval, &mx, &my);
        
        /* click in header or outside? */
-       if (BLI_in_rctf(&gnode->totr, mx, my) == 0) {
+       if (BLI_rctf_isect_pt(&gnode->totr, mx, my) == 0) {
                rctf rect = gnode->totr;
                
                rect.ymax += NODE_DY;
-               if (BLI_in_rctf(&rect, mx, my) == 0)
+               if (BLI_rctf_isect_pt(&rect, mx, my) == 0)
                        snode_make_group_editable(snode, NULL);  /* toggles, so exits editmode */
 //             else
 // XXX                 transform_nodes(snode->nodetree, 'g', "Move group");
@@ -1085,7 +1085,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
                if (in_out & SOCK_IN) {
                        for (sock = node->inputs.first; sock; sock = sock->next) {
                                if (!nodeSocketIsHidden(sock)) {
-                                       if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+                                       if (BLI_rctf_isect_pt(&rect, sock->locx, sock->locy)) {
                                                if (node == visible_node(snode, &rect)) {
                                                        *nodep = node;
                                                        *sockp = sock;
@@ -1098,7 +1098,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
                if (in_out & SOCK_OUT) {
                        for (sock = node->outputs.first; sock; sock = sock->next) {
                                if (!nodeSocketIsHidden(sock)) {
-                                       if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+                                       if (BLI_rctf_isect_pt(&rect, sock->locx, sock->locy)) {
                                                if (node == visible_node(snode, &rect)) {
                                                        *nodep = node;
                                                        *sockp = sock;
@@ -1116,7 +1116,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
        if (in_out & SOCK_IN) {
                for (sock = snode->edittree->outputs.first; sock; sock = sock->next) {
                        if (!nodeSocketIsHidden(sock)) {
-                               if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+                               if (BLI_rctf_isect_pt(&rect, sock->locx, sock->locy)) {
                                        *nodep = NULL;   /* NULL node pointer indicates group socket */
                                        *sockp = sock;
                                        return 1;
@@ -1127,7 +1127,7 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so
        if (in_out & SOCK_OUT) {
                for (sock = snode->edittree->inputs.first; sock; sock = sock->next) {
                        if (!nodeSocketIsHidden(sock)) {
-                               if (BLI_in_rctf(&rect, sock->locx, sock->locy)) {
+                               if (BLI_rctf_isect_pt(&rect, sock->locx, sock->locy)) {
                                        *nodep = NULL;   /* NULL node pointer indicates group socket */
                                        *sockp = sock;
                                        return 1;
index f5a65065895a09a59a4cc43aab21473d34b8eee9..12c221b927345a4ad63a06720a3e30163faa20ce 100644 (file)
@@ -1140,7 +1140,7 @@ static int node_attach_exec(bContext *C, wmOperator *UNUSED(op))
                /* skip selected, those are the nodes we want to attach */
                if ((frame->type != NODE_FRAME) || (frame->flag & NODE_SELECT))
                        continue;
-               if (BLI_in_rctf(&frame->totr, snode->cursor[0], snode->cursor[1]))
+               if (BLI_rctf_isect_pt(&frame->totr, snode->cursor[0], snode->cursor[1]))
                        break;
        }
        if (frame) {
index f41f203aefe32eb0c07ecbe3fdd2bd86a9ba4fda..a56d76a3ef7c1c6d5ffa6e4c6095d0202076885a 100644 (file)
@@ -563,7 +563,7 @@ static int do_lasso_select_node(bContext *C, int mcords[][2], short moves, short
                                         cent[0], cent[1],
                                         &screen_co[0], &screen_co[1]);
 
-               if (BLI_in_rcti(&rect, screen_co[0], screen_co[1]) &&
+               if (BLI_rcti_isect_pt(&rect, screen_co[0], screen_co[1]) &&
                        BLI_lasso_is_point_inside(mcords, moves, screen_co[0], screen_co[1], INT_MAX))
                {
                        if (select)
index 49d7c9ba28c5e7f35b8f43691b8c65587bca95b3..6f3cc744537992d077330cfbacc3589f35a9caa7 100644 (file)
@@ -291,7 +291,7 @@ static int view3d_selectable_data(bContext *C)
 /* helper also for borderselect */
 static int edge_fully_inside_rect(rcti *rect, short x1, short y1, short x2, short y2)
 {
-       return BLI_in_rcti(rect, x1, y1) && BLI_in_rcti(rect, x2, y2);
+       return BLI_rcti_isect_pt(rect, x1, y1) && BLI_rcti_isect_pt(rect, x2, y2);
 }
 
 static int edge_inside_rect(rcti *rect, short x1, short y1, short x2, short y2)
@@ -394,7 +394,7 @@ static void do_lasso_select_mesh__doSelectVert(void *userData, BMVert *eve, int
 {
        LassoSelectUserData *data = userData;
 
-       if (BLI_in_rcti(data->rect, x, y) &&
+       if (BLI_rcti_isect_pt(data->rect, x, y) &&
            BLI_lasso_is_point_inside(data->mcords, data->moves, x, y, IS_CLIPPED))
        {
                BM_vert_select_set(data->vc->em->bm, eve, data->select);
@@ -425,7 +425,7 @@ static void do_lasso_select_mesh__doSelectFace(void *userData, BMFace *efa, int
 {
        LassoSelectUserData *data = userData;
 
-       if (BLI_in_rcti(data->rect, x, y) &&
+       if (BLI_rcti_isect_pt(data->rect, x, y) &&
            BLI_lasso_is_point_inside(data->mcords, data->moves, x, y, IS_CLIPPED))
        {
                BM_face_select_set(data->vc->em->bm, efa, data->select);
@@ -769,7 +769,7 @@ static void do_lasso_select_node(int mcords[][2], short moves, short select)
                node_centf[1] = BLI_RCT_CENTER_Y(&node->totr);
                
                ipoco_to_areaco_noclip(G.v2d, node_centf, node_cent);
-               if (BLI_in_rcti_v(&rect, node_cent) && BLI_lasso_is_point_inside(mcords, moves, node_cent[0], node_cent[1])) {
+               if (BLI_rcti_isect_pt_v(&rect, node_cent) && BLI_lasso_is_point_inside(mcords, moves, node_cent[0], node_cent[1])) {
                        if (select) {
                                node->flag |= SELECT;
                        }
@@ -1552,7 +1552,7 @@ static void do_nurbs_box_select__doSelect(void *userData, Nurb *UNUSED(nu), BPoi
        Object *obedit = data->vc->obedit;
        Curve *cu = (Curve *)obedit->data;
 
-       if (BLI_in_rcti(data->rect, x, y)) {
+       if (BLI_rcti_isect_pt(data->rect, x, y)) {
                if (bp) {
                        bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT);
                        if (bp == cu->lastsel && !(bp->f1 & 1)) cu->lastsel = NULL;
@@ -1599,7 +1599,7 @@ static void do_lattice_box_select__doSelect(void *userData, BPoint *bp, int x, i
 {
        BoxSelectUserData *data = userData;
 
-       if (BLI_in_rcti(data->rect, x, y)) {
+       if (BLI_rcti_isect_pt(data->rect, x, y)) {
                bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT);
        }
 }
@@ -1624,7 +1624,7 @@ static void do_mesh_box_select__doSelectVert(void *userData, BMVert *eve, int x,
 {
        BoxSelectUserData *data = userData;
 
-       if (BLI_in_rcti(data->rect, x, y)) {
+       if (BLI_rcti_isect_pt(data->rect, x, y)) {
                BM_vert_select_set(data->vc->em->bm, eve, data->select);
        }
 }
@@ -1650,7 +1650,7 @@ static void do_mesh_box_select__doSelectFace(void *userData, BMFace *efa, int x,
 {
        BoxSelectUserData *data = userData;
 
-       if (BLI_in_rcti(data->rect, x, y)) {
+       if (BLI_rcti_isect_pt(data->rect, x, y)) {
                BM_face_select_set(data->vc->em->bm, efa, data->select);
        }
 }
index d3336d105c401349cd400592783f6a210c1f5634..6f3e6bee85033e4a76fc19449556566441a4d8b9 100644 (file)
@@ -2567,7 +2567,7 @@ static int border_select_exec(bContext *C, wmOperator *op)
                        tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY);
                        if (uvedit_face_visible_test(scene, ima, efa, tf)) {
                                uv_poly_center(em, efa, cent);
-                               if (BLI_in_rctf_v(&rectf, cent)) {
+                               if (BLI_rctf_isect_pt_v(&rectf, cent)) {
                                        BM_elem_flag_enable(efa, BM_ELEM_TAG);
                                        change = 1;
                                }
@@ -2592,13 +2592,13 @@ static int border_select_exec(bContext *C, wmOperator *op)
                                if (!pinned || (ts->uv_flag & UV_SYNC_SELECTION) ) {
 
                                        /* UV_SYNC_SELECTION - can't do pinned selection */
-                                       if (BLI_in_rctf_v(&rectf, luv->uv)) {
+                                       if (BLI_rctf_isect_pt_v(&rectf, luv->uv)) {
                                                if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
                                                else uvedit_uv_select_disable(em, scene, l);
                                        }
                                }
                                else if (pinned) {
-                                       if ((luv->flag & MLOOPUV_PINNED) && BLI_in_rctf_v(&rectf, luv->uv)) {
+                                       if ((luv->flag & MLOOPUV_PINNED) && BLI_rctf_isect_pt_v(&rectf, luv->uv)) {
                                                if (select) uvedit_uv_select_enable(em, scene, l, FALSE);
                                                else uvedit_uv_select_disable(em, scene, l);
                                        }
@@ -2771,7 +2771,7 @@ static int do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, sh
                                float cent[2];
                                uv_poly_center(em, efa, cent);
                                UI_view2d_view_to_region(&ar->v2d, cent[0], cent[1], &screen_uv[0], &screen_uv[1]);
-                               if (BLI_in_rcti_v(&rect, screen_uv) &&
+                               if (BLI_rcti_isect_pt_v(&rect, screen_uv) &&
                                    BLI_lasso_is_point_inside(mcords, moves, screen_uv[0], screen_uv[1], V2D_IS_CLIPPED))
                                {
                                        uvedit_face_select_enable(scene, em, efa, FALSE);
@@ -2788,7 +2788,7 @@ static int do_lasso_select_mesh_uv(bContext *C, int mcords[][2], short moves, sh
                                        if ((select) != (uvedit_uv_select_test(em, scene, l))) {
                                                MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
                                                UI_view2d_view_to_region(&ar->v2d, luv->uv[0], luv->uv[1], &screen_uv[0], &screen_uv[1]);
-                                               if (BLI_in_rcti_v(&rect, screen_uv) &&
+                                               if (BLI_rcti_isect_pt_v(&rect, screen_uv) &&
                                                    BLI_lasso_is_point_inside(mcords, moves, screen_uv[0], screen_uv[1], V2D_IS_CLIPPED))
                                                {
                                                        if (select) {
index dce4d681ec9ff1000f56e9809cd9b0d9b02167c2..2d7a64bad0459ae6e2f96c77a769756c17178989 100644 (file)
@@ -1824,7 +1824,7 @@ static void isb_bsp_face_inside(ISBBranch *bspn, BSPFace *face)
                        
                        if ((samp->facenr!=face->facenr || samp->obi!=face->obi) && samp->shadfac) {
                                if (face->box.zmin < samp->zco[2]) {
-                                       if (BLI_in_rctf_v((rctf *)&face->box, samp->zco)) {
+                                       if (BLI_rctf_isect_pt_v((rctf *)&face->box, samp->zco)) {
                                                int inshadow= 0;
                                                
                                                if (face->type) {
index 577a472b40df88669a044ac0b13c878713704d6c..60c61dbe88c533c794c786269db9e0d475c1e990 100644 (file)
@@ -922,7 +922,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event,
                                        ScrArea *sa = CTX_wm_area(C);
 
                                        if (ar && ar->regiontype == RGN_TYPE_WINDOW && event &&
-                                           BLI_in_rcti_v(&ar->winrct, &event->x))
+                                           BLI_rcti_isect_pt_v(&ar->winrct, &event->x))
                                        {
                                                winrect = &ar->winrct;
                                        }
@@ -1642,17 +1642,17 @@ static int handler_boundbox_test(wmEventHandler *handler, wmEvent *event)
                        rcti rect = *handler->bblocal;
                        BLI_rcti_translate(&rect, handler->bbwin->xmin, handler->bbwin->ymin);
 
-                       if (BLI_in_rcti_v(&rect, &event->x))
+                       if (BLI_rcti_isect_pt_v(&rect, &event->x))
                                return 1;
-                       else if (event->type == MOUSEMOVE && BLI_in_rcti_v(&rect, &event->prevx))
+                       else if (event->type == MOUSEMOVE && BLI_rcti_isect_pt_v(&rect, &event->prevx))
                                return 1;
                        else
                                return 0;
                }
                else {
-                       if (BLI_in_rcti_v(handler->bbwin, &event->x))
+                       if (BLI_rcti_isect_pt_v(handler->bbwin, &event->x))
                                return 1;
-                       else if (event->type == MOUSEMOVE && BLI_in_rcti_v(handler->bbwin, &event->prevx))
+                       else if (event->type == MOUSEMOVE && BLI_rcti_isect_pt_v(handler->bbwin, &event->prevx))
                                return 1;
                        else
                                return 0;
@@ -1888,10 +1888,10 @@ static int wm_event_inside_i(wmEvent *event, rcti *rect)
 {
        if (wm_event_always_pass(event))
                return 1;
-       if (BLI_in_rcti_v(rect, &event->x))
+       if (BLI_rcti_isect_pt_v(rect, &event->x))
                return 1;
        if (event->type == MOUSEMOVE) {
-               if (BLI_in_rcti_v(rect, &event->prevx)) {
+               if (BLI_rcti_isect_pt_v(rect, &event->prevx)) {
                        return 1;
                }
                return 0;
@@ -1906,7 +1906,7 @@ static ScrArea *area_event_inside(bContext *C, const int xy[2])
        
        if (screen)
                for (sa = screen->areabase.first; sa; sa = sa->next)
-                       if (BLI_in_rcti_v(&sa->totrct, xy))
+                       if (BLI_rcti_isect_pt_v(&sa->totrct, xy))
                                return sa;
        return NULL;
 }
@@ -1919,7 +1919,7 @@ static ARegion *region_event_inside(bContext *C, const int xy[2])
        
        if (screen && area)
                for (ar = area->regionbase.first; ar; ar = ar->next)
-                       if (BLI_in_rcti_v(&ar->winrct, xy))
+                       if (BLI_rcti_isect_pt_v(&ar->winrct, xy))
                                return ar;
        return NULL;
 }
@@ -1950,7 +1950,7 @@ static void wm_paintcursor_test(bContext *C, wmEvent *event)
                        wm_paintcursor_tag(C, wm->paintcursors.first, ar);
                
                /* if previous position was not in current region, we have to set a temp new context */
-               if (ar == NULL || !BLI_in_rcti_v(&ar->winrct, &event->prevx)) {
+               if (ar == NULL || !BLI_rcti_isect_pt_v(&ar->winrct, &event->prevx)) {
                        ScrArea *sa = CTX_wm_area(C);
                        
                        CTX_wm_area_set(C, area_event_inside(C, &event->prevx));
@@ -2125,7 +2125,7 @@ void wm_event_do_handlers(bContext *C)
                                                                        if (CTX_wm_window(C) == NULL)
                                                                                return;
 
-                                                                       doit |= (BLI_in_rcti_v(&ar->winrct, &event->x));
+                                                                       doit |= (BLI_rcti_isect_pt_v(&ar->winrct, &event->x));
                                                                        
                                                                        if (action & WM_HANDLER_BREAK)
                                                                                break;