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/port.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/port.c')
-rw-r--r-- | src/port.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -127,20 +127,18 @@ ganv_port_get_property(GObject* object, static void ganv_port_draw(GanvItem* item, - cairo_t* cr, - int cx, int cy, - int width, int height) + cairo_t* cr, double cx, double cy, double cw, double ch) { GanvPort* port = GANV_PORT(item); GanvCanvas* canvas = GANV_CANVAS(item->canvas); // Draw Box GanvItemClass* item_class = GANV_ITEM_CLASS(parent_class); - item_class->draw(item, cr, cx, cy, width, height); + item_class->draw(item, cr, cx, cy, cw, ch); if (port->impl->control) { GanvItem* const rect = GANV_ITEM(port->impl->control->rect); - GANV_ITEM_GET_CLASS(rect)->draw(rect, cr, cx, cy, width, height); + GANV_ITEM_GET_CLASS(rect)->draw(rect, cr, cx, cy, cw, ch); } if (ganv_canvas_get_direction(canvas) == GANV_DIRECTION_DOWN || @@ -155,7 +153,7 @@ ganv_port_draw(GanvItem* item, for (int i = 0; i < 2; ++i) { if (labels[i] && (labels[i]->object.flags & GANV_ITEM_VISIBLE)) { GANV_ITEM_GET_CLASS(labels[i])->draw( - labels[i], cr, cx, cy, width, height); + labels[i], cr, cx, cy, cw, ch); } } } |