Re: Fix bug #144394 and win USD 200



On Mon, 2006-10-30 at 15:18 +0100, Pontus Pihlgren wrote:
Hi.

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".

Your patch fixes this instance, but not similar problems with arcs,
polylines, zigzaglines or beziers.  Given the number of places where the
same check needs to be done, I'd say it should be refactored out.

-Lars




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