Re: Zigzagline artifacts



On Thu, 28 Mar 2002, Jason Spence wrote:
Using the official Debian package of dia (Version 0.88.1-3), the
zigzagline tool is unable to create zigzaglines with a filled triangle
head on either end pointing to the left.  When trying to orient a
headed end of the zigzagline towards the left, this happens:


|\
| >o------o--------o
|/

Instead of the expected:

  /|
o< |------o--------o
  \|

I'm not on the list, so please CC me on any replies.

This patch should solve your problem.  It is also in CVS.

Index: zigzagline.c
===================================================================
RCS file: /cvs/gnome/dia/objects/standard/zigzagline.c,v
retrieving revision 1.31
diff -r1.31 zigzagline.c
215a216,218
    int next_point = 1;
    if (distance_point_point_manhattan(&points[0], &points[1]) < 0.000000001)
      next_point++;
217c220
<              &points[0], &points[1],
---
             &points[0], &points[next_point],
222a226,228
    int next_point = n-2;
    if (distance_point_point_manhattan(&points[n-1], &points[n-2]) < 0.000000001)
      next_point--;
224c230
<              &points[n-1], &points[n-2],
---
             &points[n-1], &points[next_point],

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause)| Hårdgrim of Numenor
"I do not agree with a word that you say, but I   |----------------------------
will defend to the death your right to say it."   | Where are we going, and
    --Evelyn Beatrice Hall paraphrasing Voltaire  | what's with the handbasket?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]