Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 7353
Collapse All | Expand All

(-)dot.cpp (+17 lines)
Lines 75-81 Link Here
75
    //printf("ReadLine `%s'\n",buf);
75
    //printf("ReadLine `%s'\n",buf);
76
    if (strncmp(buf,"rect",4)==0)
76
    if (strncmp(buf,"rect",4)==0)
77
    {
77
    {
78
      // obtain the url and the coordinates in the order used by graphviz-1.5
78
      sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y2,&x2,&y1);
79
      sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y2,&x2,&y1);
80
      // later versions of graphviz corrected the y coordinate order
81
      // the rule is that y2>=y1, so test and switch if needed
82
      if (y2<y1)
83
      {
84
        int temp=y2;
85
        y2=y1;
86
        y1=temp;
87
      }
88
      // there shouldn't be any need for this for known versions of graphviz
89
      // but it can't do any harm to check that x follows the rules as well
90
      if (x2<x1)
91
      {
92
        int temp=x2;
93
        x2=x1;
94
        x1=temp;
95
      }
79
      char *refPtr = url;
96
      char *refPtr = url;
80
      char *urlPtr = strchr(url,'$');
97
      char *urlPtr = strchr(url,'$');
81
      //printf("url=`%s'\n",url);
98
      //printf("url=`%s'\n",url);

Return to bug 7353