summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-13 18:37:48 +0000
committerDavid Robillard <d@drobilla.net>2011-12-13 18:37:48 +0000
commit650f610fc90c07aa5a09cd0117a01afd7b1a85c0 (patch)
treea6aa171f02a00805a4cfa64863a3e8a24e1606f0 /src
parented2b3e83349a6b356ae971545792e4ed0e90f0f5 (diff)
downloadganv-650f610fc90c07aa5a09cd0117a01afd7b1a85c0.tar.gz
ganv-650f610fc90c07aa5a09cd0117a01afd7b1a85c0.tar.bz2
ganv-650f610fc90c07aa5a09cd0117a01afd7b1a85c0.zip
Remove unnecessary use of ArtIRect.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@3866 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/canvas-base.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/canvas-base.c b/src/canvas-base.c
index ff0e574..36def3b 100644
--- a/src/canvas-base.c
+++ b/src/canvas-base.c
@@ -2829,19 +2829,17 @@ ganv_canvas_base_expose(GtkWidget* widget, GdkEventExpose* event)
gdk_region_get_rectangles(event->region, &rects, &n_rects);
for (i = 0; i < n_rects; i++) {
- ArtIRect rect;
-
- rect.x0 = rects[i].x - canvas->zoom_xofs;
- rect.y0 = rects[i].y - canvas->zoom_yofs;
- rect.x1 = rects[i].x + rects[i].width - canvas->zoom_xofs;
- rect.y1 = rects[i].y + rects[i].height - canvas->zoom_yofs;
+ const int x0 = rects[i].x - canvas->zoom_xofs;
+ const int y0 = rects[i].y - canvas->zoom_yofs;
+ const int x1 = rects[i].x + rects[i].width - canvas->zoom_xofs;
+ const int y1 = rects[i].y + rects[i].height - canvas->zoom_yofs;
if (canvas->need_update || canvas->need_redraw) {
/* Update or drawing is scheduled, so just mark exposed area as dirty */
- ganv_canvas_base_request_redraw(canvas, rect.x0, rect.y0, rect.x1, rect.y1);
+ ganv_canvas_base_request_redraw(canvas, x0, y0, x1, y1);
} else {
/* No pending updates, draw exposed area immediately */
- ganv_canvas_base_paint_rect(canvas, rect.x0, rect.y0, rect.x1, rect.y1);
+ ganv_canvas_base_paint_rect(canvas, x0, y0, x1, y1);
/* And call expose on parent container class */
if (GTK_WIDGET_CLASS(canvas_parent_class)->expose_event) {