https://bugs.documentfoundation.org/show_bug.cgi?id=96892

--- Comment #7 from Martin <[email protected]> ---
Here's what I did to find the bug, and some things I noticed along the way.

First I took Julien's files and uncompressed the streams using pdftk. As
expected, some numbers are now given to three places, e.g. at the very
beginning:

stream
0.1 w
q 0 0.1 595.2 841.8 re

became:

stream
0.1 w
q 0 0.138 595.275 841.861 re


But the rest is less encouraging, e.g. the first long data line:

63.8 756.6 64.1 756.1 64.2 755.9 c 64.3 755.7 64.4 755.5 64.5 755.3 c

became:

63.8 756.6 64.5 756.15 64.15 755.95 c 64.3 755.75 64.4 755.55 64.5 755.3 c

It looks like the "with patch" numbers are only rounded to the nearest 1/20.
More on that later. You can also see that the third number changed quite
dramatically, 64.1 -> 64.5 -- and this is what led me to the bug.

I extracted all the numbers for one path and compared "without patch" and "with
patch". The results are attached. I found that |difference| > 0.05 only
happened in the following cases:

# without patch         with patch      difference
59.1    59.5    0.40
60.1    60.5    0.40
61.1    61.5    0.40
62.1    62.5    0.40
63.1    63.5    0.40
64.1    64.5    0.40
65.1    65.5    0.40
66.1    66.5    0.40
67.1    67.5    0.40
754     754.5   0.50
755     755.5   0.50
756     756.5   0.50
757     757.5   0.50
758     758.5   0.50
759     759.5   0.50
760     760.5   0.50
761     761.5   0.50
762     762.5   0.50

Once you've seen the bug, the explanation is obvious.

0.40 vs 0.50 - the 6x are x-coordinates, the 7xx are y-coordinates. In general
the y-coordinates decreased by 0.05, x-coordinates increased by 0.05:

58.6    58.6    0.00
58.7    58.65   -0.05
58.9    58.85   -0.05
58.9    58.9    0.00
59.1    59.1    0.00
:
753.4   753.45  0.05
753.5   753.5   0.00
753.7   753.7   0.00
753.9   753.9   0.00
753.9   753.95  0.05
754     754     0.00

I believe that the difference comes from this line in appendPoint():

nValue      = pointToPixel(getHeight()) - aPoint.Y();

or a similar line elsewhere.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to