[dia] [Jackson] setup ConnectionPoint.directions
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [Jackson] setup ConnectionPoint.directions
- Date: Sat, 20 Jul 2013 22:25:14 +0000 (UTC)
commit 926ec201d18b973dd7d0d54007020b800d1c08c1
Author: Hans Breuer <hans breuer org>
Date: Sun Jun 30 12:01:05 2013 +0200
[Jackson] setup ConnectionPoint.directions
For proper auto-routing support the connection point directions
shall be setup properly. Soon to be checked by a unit test.
objects/Jackson/requirement.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/objects/Jackson/requirement.c b/objects/Jackson/requirement.c
index 93ad053..0f9a9a7 100644
--- a/objects/Jackson/requirement.c
+++ b/objects/Jackson/requirement.c
@@ -361,8 +361,19 @@ req_create(Point *startpoint,
obj->connections[i] = &req->connections[i];
req->connections[i].object = obj;
req->connections[i].connected = NULL;
+ req->connections[i].flags = 0;
+ req->connections[i].directions = 0;
+ if (i < 3)
+ req->connections[i].directions |= DIR_NORTH;
+ else if (i > 4)
+ req->connections[i].directions |= DIR_SOUTH;
+ if (i == 0 || i == 3 || i == 5)
+ req->connections[i].directions |= DIR_WEST;
+ else if (i == 2 || i == 4 || i == 7)
+ req->connections[i].directions |= DIR_EAST;
}
req->connections[8].flags = CP_FLAGS_MAIN;
+ req->connections[8].directions |= DIR_ALL;
elem->extra_spacing.border_trans = 0.0;
req_update_data(req);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]