From a57dfac61716538f4022134bdfe8f200541d6c1d Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 26 Jan 2005 18:58:15 +0000 Subject: [PATCH] Add comments describing the coordinate change operators associated with different rankdir values --- lib/common/utils.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/common/utils.c b/lib/common/utils.c index b84419f72..553acc3e3 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -923,6 +923,12 @@ int common_init_edge(edge_t * e) return r; } +/* flip_ptf: + * Transform point => + * LR - rotate ccw by 90 + * BT - reflect across x axis + * RL - TB o LR + */ point flip_pt(point p, int rankdir) { int x = p.x, y = p.y; @@ -945,6 +951,9 @@ point flip_pt(point p, int rankdir) return p; } +/* flip_ptf: + * flip_pt for pointf type. + */ pointf flip_ptf(pointf p, int rankdir) { double x = p.x, y = p.y; @@ -967,6 +976,13 @@ pointf flip_ptf(pointf p, int rankdir) return p; } +/* invflip_ptf: + * Transform point => + * LR - rotate cw by 90 + * BT - reflect across x axis + * RL - TB o LR + * Note that flip and invflip only differ on LR + */ point invflip_pt(point p, int rankdir) { int x = p.x, y = p.y; -- 2.40.0