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/editors
parentf8bf58e0f21c59c4440165fbad55b082846b6b54 (diff)
minor refactor for rect functions. more consistent naming.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c2
-rw-r--r--source/blender/editors/interface/interface_draw.c2
-rw-r--r--source/blender/editors/screen/area.c2
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/space_file/file_ops.c4
-rw-r--r--source/blender/editors/space_image/image_buttons.c2
-rw-r--r--source/blender/editors/space_node/drawnode.c4
-rw-r--r--source/blender/editors/space_node/node_edit.c2
-rw-r--r--source/blender/editors/space_node/node_select.c2
-rw-r--r--source/blender/editors/space_node/node_state.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c2
16 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index bc912fc8c76..7906d632f86 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -769,7 +769,7 @@ void draw_gpencil_view3d(Scene *scene, View3D *v3d, ARegion *ar, short only3d)
if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) {
rctf rectf;
ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, TRUE); /* no shift */
- BLI_copy_rcti_rctf(&rect, &rectf);
+ BLI_rcti_rctf_copy(&rect, &rectf);
}
else {
rect.xmin = 0;
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index e576b71e442..1d88838ecc5 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1353,7 +1353,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect
scissor_new.ymin = ar->winrct.ymin + rect->ymin;
scissor_new.xmax = ar->winrct.xmin + rect->xmax;
scissor_new.ymax = ar->winrct.ymin + rect->ymax;
- BLI_isect_rcti(&scissor_new, &ar->winrct, &scissor_new);
+ BLI_rcti_isect(&scissor_new, &ar->winrct, &scissor_new);
glScissor(scissor_new.xmin, scissor_new.ymin, scissor_new.xmax - scissor_new.xmin, scissor_new.ymax - scissor_new.ymin);
/* calculate offset and zoom */
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 714700ec8f1..f8ca150e28e 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -403,7 +403,7 @@ void region_scissor_winrct(ARegion *ar, rcti *winrct)
while (ar->prev) {
ar = ar->prev;
- if (BLI_isect_rcti(winrct, &ar->winrct, NULL)) {
+ if (BLI_rcti_isect(winrct, &ar->winrct, NULL)) {
if (ar->flag & RGN_FLAG_HIDDEN) ;
else if (ar->alignment & RGN_SPLIT_PREV) ;
else if (ar->alignment == RGN_OVERLAP_LEFT) {
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 547e7bc8e5a..c97e91f74b6 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -827,7 +827,7 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* adds window to WM */
rect = sa->totrct;
- BLI_translate_rcti(&rect, win->posx, win->posy);
+ BLI_rcti_translate(&rect, win->posx, win->posy);
newwin = WM_window_open(C, &rect);
/* allocs new screen and adds to newly created window, using window size */
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index bfac2922c2b..35d508c5a1f 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -369,7 +369,7 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d,
ss = ob->sculpt;
if (ss->cache) {
if (!BLI_rcti_is_empty(&ss->cache->previous_r))
- BLI_union_rcti(rect, &ss->cache->previous_r);
+ BLI_rcti_union(rect, &ss->cache->previous_r);
}
return 1;
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 9591e624296..6856ce996e7 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -248,7 +248,7 @@ static int file_border_select_modal(bContext *C, wmOperator *op, wmEvent *event)
rect.xmax = RNA_int_get(op->ptr, "xmax");
rect.ymax = RNA_int_get(op->ptr, "ymax");
- BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect);
+ BLI_rcti_isect(&(ar->v2d.mask), &rect, &rect);
sel = file_selection_get(C, &rect, 0);
if ( (sel.first != params->sel_first) || (sel.last != params->sel_last) ) {
@@ -288,7 +288,7 @@ static int file_border_select_exec(bContext *C, wmOperator *op)
file_deselect_all(sfile, SELECTED_FILE);
}
- BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect);
+ BLI_rcti_isect(&(ar->v2d.mask), &rect, &rect);
ret = file_select(C, &rect, select ? FILE_SEL_ADD : FILE_SEL_REMOVE, 0);
if (FILE_SELECT_DIR == ret) {
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 99969405f9c..7989a8e1b34 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -280,7 +280,7 @@ static void preview_cb(struct ScrArea *sa, struct uiBlock *block)
ui_graphics_to_window_rct(sa->win, &dispf, disprect);
/* correction for gla draw */
- BLI_translate_rcti(disprect, -curarea->winrct.xmin, -curarea->winrct.ymin);
+ BLI_rcti_translate(disprect, -curarea->winrct.xmin, -curarea->winrct.ymin);
calc_image_view(sima, 'p');
// printf("winrct %d %d %d %d\n", disprect->xmin, disprect->ymin,disprect->xmax, disprect->ymax);
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 2a5739db56f..87a07407ee6 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -523,7 +523,7 @@ static void node_update_group(const bContext *C, bNodeTree *ntree, bNode *gnode)
counter = 0;
}
else
- BLI_union_rctf(rect, &node->totr);
+ BLI_rctf_union(rect, &node->totr);
}
/* add some room for links to group sockets */
@@ -954,7 +954,7 @@ static void node_update_frame(const bContext *UNUSED(C), bNodeTree *ntree, bNode
data->flag &= ~NODE_FRAME_RESIZEABLE;
}
else
- BLI_union_rctf(&rect, &noderect);
+ BLI_rctf_union(&rect, &noderect);
}
/* now adjust the frame size from view-space bounding box */
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index c4e72fa4a51..82f3eb1890d 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1521,7 +1521,7 @@ static bNode *visible_node(SpaceNode *snode, rctf *rct)
bNode *node;
for (node = snode->edittree->nodes.last; node; node = node->prev) {
- if (BLI_isect_rctf(&node->totr, rct, NULL))
+ if (BLI_rctf_isect(&node->totr, rct, NULL))
break;
}
return node;
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index e7be750928d..1ea763a413d 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -474,7 +474,7 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
UI_view2d_region_to_view(&ar->v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
for (node= snode->edittree->nodes.first; node; node= node->next) {
- if (BLI_isect_rctf(&rectf, &node->totr, NULL)) {
+ if (BLI_rctf_isect(&rectf, &node->totr, NULL)) {
if (gesture_mode==GESTURE_MODAL_SELECT)
node_select(node);
else
diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c
index 5463d4a8ff0..b21d31ad619 100644
--- a/source/blender/editors/space_node/node_state.c
+++ b/source/blender/editors/space_node/node_state.c
@@ -78,7 +78,7 @@ static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNode* snode)
ar->v2d.cur= node->totr;
}
else {
- BLI_union_rctf(cur, &node->totr);
+ BLI_rctf_union(cur, &node->totr);
}
}
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 1c3d2b61488..82e2730c59e 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -2124,7 +2124,7 @@ static int sequencer_view_zoom_ratio_exec(bContext *C, wmOperator *op)
float facx = (v2d->mask.xmax - v2d->mask.xmin) / winx;
float facy = (v2d->mask.ymax - v2d->mask.ymin) / winy;
- BLI_resize_rctf(&v2d->cur, (int)(winx * facx * ratio) + 1, (int)(winy * facy * ratio) + 1);
+ BLI_rctf_resize(&v2d->cur, (int)(winx * facx * ratio) + 1, (int)(winy * facy * ratio) + 1);
ED_region_tag_redraw(CTX_wm_region(C));
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index a55f0edc06c..7849f84e777 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -875,7 +875,7 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op)
for (seq = ed->seqbasep->first; seq; seq = seq->next) {
seq_rectf(seq, &rq);
- if (BLI_isect_rctf(&rq, &rectf, NULL)) {
+ if (BLI_rctf_isect(&rq, &rectf, NULL)) {
if (selecting) seq->flag |= SELECT;
else seq->flag &= ~SEQ_ALLSEL;
recurs_sel_seq(seq);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index b651dfcb8db..c1b2e2f07e2 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -2162,7 +2162,7 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, const flo
/* make an int copy */
int s_int[2][2] = {{s[0][0], s[0][1]},
{s[1][0], s[1][1]}};
- if (!BLI_segment_in_rcti(&data->win_rect, s_int[0], s_int[1])) {
+ if (!BLI_rcti_isect_segment(&data->win_rect, s_int[0], s_int[1])) {
return;
}
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 1ace4688991..1dbc40a0c07 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2028,7 +2028,7 @@ void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect)
r.ymax = ar->winy - 1;
/* Constrain rect to depth bounds */
- BLI_isect_rcti(&r, rect, rect);
+ BLI_rcti_isect(&r, rect, rect);
/* assign values to compare with the ViewDepths */
x = rect->xmin;
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index bc41ecd1dc5..3abfda78ec3 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1786,7 +1786,7 @@ static int game_engine_exec(bContext *C, wmOperator *op)
cam_frame.xmax = cam_framef.xmax + ar->winrct.xmin;
cam_frame.ymin = cam_framef.ymin + ar->winrct.ymin;
cam_frame.ymax = cam_framef.ymax + ar->winrct.ymin;
- BLI_isect_rcti(&ar->winrct, &cam_frame, &cam_frame);
+ BLI_rcti_isect(&ar->winrct, &cam_frame, &cam_frame);
}
else {
cam_frame.xmin = ar->winrct.xmin;