diff options
author | David Robillard <d@drobilla.net> | 2014-03-30 20:12:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-03-30 20:12:48 +0000 |
commit | e477fba7331b8a874b00a567defb09a888590aea (patch) | |
tree | a9a1626aae2137072e42fe48779f0b43f8d0c42d /src/item.c | |
parent | 7bf9f530dbdfcaa8151424908d492ef7c6c05e79 (diff) | |
download | ganv-e477fba7331b8a874b00a567defb09a888590aea.tar.gz ganv-e477fba7331b8a874b00a567defb09a888590aea.tar.bz2 ganv-e477fba7331b8a874b00a567defb09a888590aea.zip |
Reimplement canvas zoom.
Make select rectangle translucent.
Make ctrl+scroll wheel zoom, not change font size.
Add separate controls in Patchage for zoom (scale) and font size.
Banish canvas coordinates from item implementations.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5345 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/item.c')
-rw-r--r-- | src/item.c | 29 |
1 files changed, 13 insertions, 16 deletions
@@ -126,9 +126,9 @@ item_post_create_setup(GanvItem* item) g_warning("item added to non-parent item\n"); } } - ganv_canvas_request_redraw(item->canvas, - item->x1, item->y1, - item->x2 + 1, item->y2 + 1); + ganv_canvas_request_redraw_w(item->canvas, + item->x1, item->y1, + item->x2 + 1, item->y2 + 1); ganv_canvas_set_need_repick(item->canvas); } @@ -230,9 +230,9 @@ static void redraw_if_visible(GanvItem* item) { if (item->object.flags & GANV_ITEM_VISIBLE) { - ganv_canvas_request_redraw(item->canvas, - item->x1, item->y1, - item->x2 + 1, item->y2 + 1); + ganv_canvas_request_redraw_w(item->canvas, + item->x1, item->y1, + item->x2 + 1, item->y2 + 1); } } @@ -315,10 +315,7 @@ ganv_item_update(GanvItem* item, int flags) /* Point handler for canvas items */ static double -ganv_item_point(GanvItem* item, - double x, double y, - int cx, int cy, - GanvItem** actual_item) +ganv_item_point(GanvItem* item, double x, double y, GanvItem** actual_item) { *actual_item = NULL; return G_MAXDOUBLE; @@ -431,9 +428,9 @@ ganv_item_show(GanvItem* item) if (!(item->object.flags & GANV_ITEM_VISIBLE)) { item->object.flags |= GANV_ITEM_VISIBLE; - ganv_canvas_request_redraw(item->canvas, - item->x1, item->y1, - item->x2 + 1, item->y2 + 1); + ganv_canvas_request_redraw_w(item->canvas, + item->x1, item->y1, + item->x2 + 1, item->y2 + 1); ganv_canvas_set_need_repick(item->canvas); } } @@ -452,9 +449,9 @@ ganv_item_hide(GanvItem* item) if (item->object.flags & GANV_ITEM_VISIBLE) { item->object.flags &= ~GANV_ITEM_VISIBLE; - ganv_canvas_request_redraw(item->canvas, - item->x1, item->y1, - item->x2 + 1, item->y2 + 1); + ganv_canvas_request_redraw_w(item->canvas, + item->x1, item->y1, + item->x2 + 1, item->y2 + 1); ganv_canvas_set_need_repick(item->canvas); } } |