diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-05 12:46:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-05 12:48:53 +0300 |
commit | 3d5622a20883f6eab4dfb491faf57b3e5e349e9e (patch) | |
tree | 4176a67ddb8df7e11b47f2e92772c54053058852 /source | |
parent | 57408177d20eaeb53d2335494350b19d544e9a4d (diff) |
Cleanup: pass pointer to rctf
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/include/ED_screen.h | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 9 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 2 |
5 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 5bc606ca725..df3a582d378 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -69,7 +69,7 @@ void ED_region_header_init(struct ARegion *ar); void ED_region_header(const struct bContext *C, struct ARegion *ar); void ED_region_toggle_hidden(struct bContext *C, struct ARegion *ar); void ED_region_info_draw(struct ARegion *ar, const char *text, float fill_color[4], const bool full_redraw); -void ED_region_image_metadata_draw(int x, int y, struct ImBuf *ibuf, rctf frame, float zoomx, float zoomy); +void ED_region_image_metadata_draw(int x, int y, struct ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy); void ED_region_grid_draw(struct ARegion *ar, float zoomx, float zoomy); float ED_region_blend_factor(struct ARegion *ar); void ED_region_visible_rect(struct ARegion *ar, struct rcti *rect); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 79d6b845361..9899779fc06 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2202,7 +2202,7 @@ static float metadata_box_height_get(ImBuf *ibuf, int fontid, const bool is_top) #undef MAX_METADATA_STR -void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, rctf frame, float zoomx, float zoomy) +void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, const rctf *frame, float zoomx, float zoomy) { float box_y; rctf rect; @@ -2229,7 +2229,7 @@ void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, rctf frame, float UI_ThemeColor(TH_METADATA_BG); /* set up rect */ - BLI_rctf_init(&rect, frame.xmin, frame.xmax, frame.ymax, frame.ymax + box_y); + BLI_rctf_init(&rect, frame->xmin, frame->xmax, frame->ymax, frame->ymax + box_y); /* draw top box */ glRectf(rect.xmin, rect.ymin, rect.xmax, rect.ymax); @@ -2251,7 +2251,7 @@ void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, rctf frame, float UI_ThemeColor(TH_METADATA_BG); /* set up box rect */ - BLI_rctf_init(&rect, frame.xmin, frame.xmax, frame.ymin - box_y, frame.ymin); + BLI_rctf_init(&rect, frame->xmin, frame->xmax, frame->ymin - box_y, frame->ymin); /* draw top box */ glRectf(rect.xmin, rect.ymin, rect.xmax, rect.ymax); diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 62bb372514b..8479815acf5 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -286,7 +286,6 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar, MovieClip *clip = ED_space_clip_get_clip(sc); int filter = GL_LINEAR; int x, y; - rctf frame; /* find window pixel coordinates of origin */ UI_view2d_view_to_region(&ar->v2d, 0.0f, 0.0f, &x, &y); @@ -313,10 +312,12 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar, /* reset zoom */ glPixelZoom(1.0f, 1.0f); - BLI_rctf_init(&frame, 0.0f, ibuf->x, 0.0f, ibuf->y); - if (sc->flag & SC_SHOW_METADATA) - ED_region_image_metadata_draw(x, y, ibuf, frame, zoomx * width / ibuf->x, zoomy * height / ibuf->y); + if (sc->flag & SC_SHOW_METADATA) { + rctf frame; + BLI_rctf_init(&frame, 0.0f, ibuf->x, 0.0f, ibuf->y); + ED_region_image_metadata_draw(x, y, ibuf, &frame, zoomx * width / ibuf->x, zoomy * height / ibuf->y); + } if (ibuf->planes == 32) glDisable(GL_BLEND); diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 3a178ed0277..525947e09b6 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -855,7 +855,7 @@ void draw_image_main(const bContext *C, ARegion *ar) BLI_rctf_init(&frame, 0.0f, ibuf->x, 0.0f, ibuf->y); UI_view2d_view_to_region(&ar->v2d, 0.0f, 0.0f, &x, &y); - ED_region_image_metadata_draw(x, y, ibuf, frame, zoomx, zoomy); + ED_region_image_metadata_draw(x, y, ibuf, &frame, zoomx, zoomy); } } diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index afa59876647..114e8d657d8 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1362,7 +1362,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq IMB_freeImBuf(ibuf); if (draw_metadata) { - ED_region_image_metadata_draw(0.0, 0.0, ibuf, v2d->tot, 1.0, 1.0); + ED_region_image_metadata_draw(0.0, 0.0, ibuf, &v2d->tot, 1.0, 1.0); } if (draw_backdrop) { |