summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/port.c b/src/port.c
index 29a7a10..4750064 100644
--- a/src/port.c
+++ b/src/port.c
@@ -164,9 +164,9 @@ ganv_port_tail_vector(const GanvNode* self,
double* dx,
double* dy)
{
- GanvItem* item = GANV_ITEM(self);
GanvPort* port = GANV_PORT(self);
- GanvCanvas* canvas = GANV_CANVAS(GANV_ITEM(self)->canvas);
+ GanvItem* item = &port->box.node.item;
+ GanvCanvas* canvas = GANV_CANVAS(item->canvas);
const double px = item->x;
const double py = item->y;
@@ -186,7 +186,7 @@ ganv_port_tail_vector(const GanvNode* self,
break;
}
- ganv_item_i2w(GANV_ITEM(self)->parent, x, y);
+ ganv_item_i2w(item->parent, x, y);
}
static void
@@ -197,9 +197,9 @@ ganv_port_head_vector(const GanvNode* self,
double* dx,
double* dy)
{
- GanvItem* item = GANV_ITEM(self);
GanvPort* port = GANV_PORT(self);
- GanvCanvas* canvas = GANV_CANVAS(GANV_ITEM(self)->canvas);
+ GanvItem* item = &port->box.node.item;
+ GanvCanvas* canvas = GANV_CANVAS(item->canvas);
const double px = item->x;
const double py = item->y;
@@ -219,7 +219,7 @@ ganv_port_head_vector(const GanvNode* self,
break;
}
- ganv_item_i2w(GANV_ITEM(self)->parent, x, y);
+ ganv_item_i2w(item->parent, x, y);
}
static void