From 646675f0d21abec2848ae8e25f906aa693139fbd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 13 Dec 2011 21:22:11 +0000 Subject: 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 --- src/node.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/node.c') diff --git a/src/node.c b/src/node.c index 51a0c52..96bc039 100644 --- a/src/node.c +++ b/src/node.c @@ -102,6 +102,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, @@ -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; -- cgit v1.2.1