~ubuntu-branches/ubuntu/lucid/graphviz/lucid

« back to all changes in this revision

Viewing changes to lib/dotgen/dotsplines.c

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2008-06-19 20:23:23 UTC
  • mfrom: (1.2.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080619202323-ls23h96ntj9ny94m
Tags: 2.18-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build depend on liblualib50-dev instead of liblua5.1-0-dev.
  - Drop libttf-dev (libttf-dev is in universe) (LP: #174749).
  - Replace gs-common with ghostscript.
  - Build-depend on python-dev instead of python2.4-dev or python2.5-dev.
  - Mention the correct python version for the python bindings in the
    package description.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: dotsplines.c,v 1.40 2007/06/06 18:09:41 erg Exp $ $Revision: 1.40 $ */
 
1
/* $Id: dotsplines.c,v 1.42 2008/03/03 23:01:51 ellson Exp $ $Revision: 1.42 $ */
2
2
/* vim:set shiftwidth=4 ts=8: */
3
3
 
4
4
/**********************************************************
924
924
        if ((auxe == hvye) & !ED_alg(auxe)) continue; /* pseudo-edge */
925
925
        auxbz = ED_spl(auxe)->list;
926
926
        bz = new_spline(e, auxbz->size);
927
 
        bz->sflag = auxbz->sflag;
928
 
        bz->sp = transform(auxbz->sp, del, GD_flip(g));
929
 
        bz->eflag = auxbz->eflag;
930
 
        bz->ep = transform(auxbz->ep, del, GD_flip(g));
 
927
        if (GD_flip(g)) {
 
928
            bz->sflag = auxbz->eflag;
 
929
            bz->sp = transform(auxbz->ep, del, 1);
 
930
            bz->eflag = auxbz->sflag;
 
931
            bz->ep = transform(auxbz->sp, del, 1);
 
932
        }
 
933
        else {
 
934
            bz->sflag = auxbz->sflag;
 
935
            bz->sp = transform(auxbz->sp, del, 0);
 
936
            bz->eflag = auxbz->eflag;
 
937
            bz->ep = transform(auxbz->ep, del, 0);
 
938
        }
931
939
        for (j = 0; j <  auxbz->size; j++) {
932
940
            point pt;
933
941
            pt = bz->list[j] = transform(auxbz->list[j], del, GD_flip(g));
1412
1420
                       ND_coord_i(hn).y + GD_rank(hn->graph)[ND_rank(hn)].ht2);
1413
1421
            if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
1414
1422
                hend.boxes[hend.boxn++] = b;
1415
 
            P->end.theta = PI / 2, P->end.constrained = TRUE;
 
1423
            P->end.theta = M_PI / 2, P->end.constrained = TRUE;
1416
1424
            completeregularpath(P, segfirst, e, &tend, &hend, boxes, boxn, 1);
1417
1425
            if (splines) ps = routesplines(P, &pn);
1418
1426
            else {
1439
1447
                       ND_coord_i(tn).y - GD_rank(tn->graph)[ND_rank(tn)].ht1);
1440
1448
            if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
1441
1449
                tend.boxes[tend.boxn++] = b;
1442
 
            P->start.theta = -PI / 2, P->start.constrained = TRUE;
 
1450
            P->start.theta = -M_PI / 2, P->start.constrained = TRUE;
1443
1451
            smode = FALSE;
1444
1452
        }
1445
1453
        boxes[boxn++] = rank_box(sp, g, ND_rank(tn));