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>2021-01-25 10:31:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-01-25 10:34:29 +0300
commit0cb264a282626d1f363d1898695f44285e1e0027 (patch)
treef35b894c87fd338e71584b5b21d84337e0a73c19 /source/blender/editors/space_view3d/view3d_draw.c
parent17ac860cefe66cbb2abae3448d4a949a6fccc520 (diff)
Cleanup: pass 'rctf' rectangle to 2D box drawing functions
Passing 4x arguments for the rectangle, mixed in with round-box radius & color wasn't very readable. Instead, pass a `rctf` as the first argument to UI box drawing functions.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 5e61d9d6250..eee8549572f 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -723,15 +723,24 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region,
}
if (ca->flag & CAM_SHOW_SAFE_MARGINS) {
- UI_draw_safe_areas(
- shdr_pos, x1, x2, y1, y2, scene->safe_areas.title, scene->safe_areas.action);
+ UI_draw_safe_areas(shdr_pos,
+ &(const rctf){
+ .xmin = x1,
+ .xmax = x2,
+ .ymin = y1,
+ .ymax = y2,
+ },
+ scene->safe_areas.title,
+ scene->safe_areas.action);
if (ca->flag & CAM_SHOW_SAFE_CENTER) {
UI_draw_safe_areas(shdr_pos,
- x1,
- x2,
- y1,
- y2,
+ &(const rctf){
+ .xmin = x1,
+ .xmax = x2,
+ .ymin = y1,
+ .ymax = y2,
+ },
scene->safe_areas.title_center,
scene->safe_areas.action_center);
}