summaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-13 21:22:11 +0000
committerDavid Robillard <d@drobilla.net>2011-12-13 21:22:11 +0000
commit646675f0d21abec2848ae8e25f906aa693139fbd (patch)
treef53846e77aa6ae10d44f5123990a1c9a0b81207b /src/node.c
parent650f610fc90c07aa5a09cd0117a01afd7b1a85c0 (diff)
downloadganv-646675f0d21abec2848ae8e25f906aa693139fbd.tar.gz
ganv-646675f0d21abec2848ae8e25f906aa693139fbd.tar.bz2
ganv-646675f0d21abec2848ae8e25f906aa693139fbd.zip
Remove libart dependency.
Replace unneeded arbitrary per-item affine with simple x, y coordinates. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@3867 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/node.c')
-rw-r--r--src/node.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/node.c b/src/node.c
index 51a0c52..96bc039 100644
--- a/src/node.c
+++ b/src/node.c
@@ -103,6 +103,23 @@ ganv_node_destroy(GtkObject* object)
}
static void
+ganv_node_draw(GanvItem* item,
+ cairo_t* cr,
+ int cx, int cy,
+ int width, int height)
+{
+ if (GANV_ITEM_CLASS(parent_class)->draw) {
+ (*GANV_ITEM_CLASS(parent_class)->draw)(item, cr, cx, cy, width, height);
+ }
+
+ GanvNode* node = GANV_NODE(item);
+ if (node->impl->label) {
+ GanvItem* label_item = GANV_ITEM(node->impl->label);
+ GANV_ITEM_GET_CLASS(label_item)->draw(label_item, cr, cx, cy, width, height);
+ }
+}
+
+static void
ganv_node_set_property(GObject* object,
guint prop_id,
const GValue* value,
@@ -572,6 +589,7 @@ ganv_node_class_init(GanvNodeClass* class)
item_class->realize = ganv_node_realize;
item_class->event = ganv_node_default_event;
+ item_class->draw = ganv_node_draw;
class->disconnect = ganv_node_default_disconnect;
class->move = ganv_node_default_move;