Re: Fix bug #144394 and win USD 200


I found a workaround that works for me. Its not very pretty but it might
point in the direction of a real solution.

The problem is the size of the arrowheads(namely arrow width and arrow
length). They are very small or zero, which seems to make the renderer
go bonkers. I'm thinking its a problem with the arrow rendering code
that moves the line to avoid lines being drawn in hollow arrows, either
that or its something with bounding boxes ??

There are then three solutions:

1. Fix the diagram files. I have attached a file from the bug report
where I changed the values from small/zero to 0.1

2. Fix the drawing algorithm to account for small arrowheads. I tried to
do this but failed. ( The reason I failed is because I'm not familiar
with the rendering code and don't have time to delve into it, but I'm
sure it can be done.)

3. Fix the diagram loader to capture weird arrows. This I have managed
to do, patch attached. What I did was checking if arrow "length" or
"width" was below 0.000000001 (an arbitrary low number). And if it was I
set the type to "ARROW_NONE".

So, here is the patch, I got it by doing "cvs diff objects/standard/line.c":

Index: objects/standard/line.c
RCS file: /cvs/gnome/dia/objects/standard/line.c,v
retrieving revision 1.54
diff -r1.54 line.c
<   if (attr != NULL)
  if (attr != NULL){
    if( line -> end_arrow.length < 0.000000001 )
      line -> end_arrow.type = ARROW_NONE;
<   if (attr != NULL)
  if (attr != NULL){
    if( line -> end_arrow.width < 0.00000001 )
      line -> end_arrow.type = ARROW_NONE;


tim bogie gvds com au wrote:
Interested developers,

I would like to offer the first contributor (individual or team)
$US200.00 to having issue 144394 resolved, as per email below.  I'm
hoping this is big enough carrot!  Payment will be via Paypal.  I'll
leave it up to Lars, Hans, and Steffen to be the judge of the best
offered solution.

I think a time frame for completion of four weeks from now should be
enough.  If anyone has any issues with four weeks, let me know.

Hans, Lars, Steffen, can we have this mentioned on Dia's web site?


Timothy Bogie

*From*: "Steffen Macke" <sdteffen gmail com>
*Sent*: Friday, 13 October 2006 5:08 AM
*To*: "discussions about usage and development of dia"
<dia-list gnome org>
*Subject*: Fix bug #144394 and win USD 100

Hello All,

Dia has received quite an amount of donations over the past
months (A big thanks to Tim Bogie who is doing the majority of
the donations).

This puts us in a position where we can offer USD 100 for the one
who provides a fix of bug 144394:

The payment can be made through Paypal.

If you are a developer and would like to receive some monetary rewards
for fixing other bugs or implementing things, please put your proposals

Other ideas how to burn the money are also welcome.

Happy Coding!

Dia-list mailing list
Dia-list gnome org
FAQ at
Main page at


Dia-list mailing list
Dia-list gnome org
FAQ at
Main page at


Attachment: Diagram4_edit.dia
Description: Binary data

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