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:
Diffstat (limited to 'source/blender/editors/gpencil/annotate_draw.c')
-rw-r--r--source/blender/editors/gpencil/annotate_draw.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index 6e91be862a9..1a30555a584 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -933,7 +933,7 @@ static void annotation_draw_data_layers(
}
/* draw a short status message in the top-right corner */
-static void annotation_draw_status_text(const bGPdata *gpd, ARegion *ar)
+static void annotation_draw_status_text(const bGPdata *gpd, ARegion *region)
{
/* Cannot draw any status text when drawing OpenGL Renders */
@@ -942,7 +942,7 @@ static void annotation_draw_status_text(const bGPdata *gpd, ARegion *ar)
}
/* Get bounds of region - Necessary to avoid problems with region overlap */
- const rcti *rect = ED_region_visible_rect(ar);
+ const rcti *rect = ED_region_visible_rect(region);
/* for now, this should only be used to indicate when we are in stroke editmode */
if (gpd->flag & GP_DATA_STROKE_EDITMODE) {
@@ -1050,7 +1050,7 @@ void ED_annotation_draw_2dimage(const bContext *C)
{
wmWindowManager *wm = CTX_wm_manager(C);
ScrArea *sa = CTX_wm_area(C);
- ARegion *ar = CTX_wm_region(C);
+ ARegion *region = CTX_wm_region(C);
Scene *scene = CTX_data_scene(C);
int offsx, offsy, sizex, sizey;
@@ -1071,10 +1071,11 @@ void ED_annotation_draw_2dimage(const bContext *C)
* so disabled. */
offsx = 0;
offsy = 0;
- sizex = ar->winx;
- sizey = ar->winy;
+ sizex = region->winx;
+ sizey = region->winy;
- wmOrtho2(ar->v2d.cur.xmin, ar->v2d.cur.xmax, ar->v2d.cur.ymin, ar->v2d.cur.ymax);
+ wmOrtho2(
+ region->v2d.cur.xmin, region->v2d.cur.xmax, region->v2d.cur.ymin, region->v2d.cur.ymax);
dflag |= GP_DRAWDATA_ONLYV2D | GP_DRAWDATA_IEDITHACK;
break;
@@ -1084,8 +1085,8 @@ void ED_annotation_draw_2dimage(const bContext *C)
/* just draw using standard scaling (settings here are currently ignored anyways) */
offsx = 0;
offsy = 0;
- sizex = ar->winx;
- sizey = ar->winy;
+ sizex = region->winx;
+ sizey = region->winy;
/* NOTE: I2D was used in 2.4x, but the old settings for that have been deprecated
* and everything moved to standard View2d
@@ -1096,8 +1097,8 @@ void ED_annotation_draw_2dimage(const bContext *C)
default: /* for spacetype not yet handled */
offsx = 0;
offsy = 0;
- sizex = ar->winx;
- sizey = ar->winy;
+ sizex = region->winx;
+ sizey = region->winy;
dflag |= GP_DRAWDATA_ONLYI2D;
break;
@@ -1124,7 +1125,7 @@ void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
{
wmWindowManager *wm = CTX_wm_manager(C);
ScrArea *sa = CTX_wm_area(C);
- ARegion *ar = CTX_wm_region(C);
+ ARegion *region = CTX_wm_region(C);
Scene *scene = CTX_data_scene(C);
int dflag = 0;
@@ -1152,11 +1153,12 @@ void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
dflag |= GP_DRAWDATA_NO_ONIONS;
}
- annotation_draw_data_all(scene, gpd, 0, 0, ar->winx, ar->winy, CFRA, dflag, sa->spacetype);
+ annotation_draw_data_all(
+ scene, gpd, 0, 0, region->winx, region->winy, CFRA, dflag, sa->spacetype);
/* draw status text (if in screen/pixel-space) */
if (!onlyv2d) {
- annotation_draw_status_text(gpd, ar);
+ annotation_draw_status_text(gpd, region);
}
}
@@ -1164,10 +1166,10 @@ void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
* Note: this gets called twice - first time with only3d=true to draw 3d-strokes,
* second time with only3d=false for screen-aligned strokes */
void ED_annotation_draw_view3d(
- Scene *scene, struct Depsgraph *depsgraph, View3D *v3d, ARegion *ar, bool only3d)
+ Scene *scene, struct Depsgraph *depsgraph, View3D *v3d, ARegion *region, bool only3d)
{
int dflag = 0;
- RegionView3D *rv3d = ar->regiondata;
+ RegionView3D *rv3d = region->regiondata;
int offsx, offsy, winx, winy;
/* check that we have grease-pencil stuff to draw */
@@ -1181,7 +1183,7 @@ void ED_annotation_draw_view3d(
* deal with the camera border, otherwise map the coords to the camera border. */
if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_FLAG_RENDER_VIEWPORT)) {
rctf rectf;
- ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &rectf, true); /* no shift */
+ ED_view3d_calc_camera_border(scene, depsgraph, region, v3d, rv3d, &rectf, true); /* no shift */
offsx = round_fl_to_int(rectf.xmin);
offsy = round_fl_to_int(rectf.ymin);
@@ -1191,8 +1193,8 @@ void ED_annotation_draw_view3d(
else {
offsx = 0;
offsy = 0;
- winx = ar->winx;
- winy = ar->winy;
+ winx = region->winx;
+ winy = region->winy;
}
/* set flags */