Red Hat Bugzilla – Bug 1312302
Strange loss of drawing precision when drawing circles
Last modified: 2016-11-24 15:28:26 EST
Created attachment 1130822 [details]
kig file with a simple construction
Description of problem:
In many cases the graphic drawing presents strange precision loss, like circles that should go through the same point but they don't. Numerical error does not explain the result.
In the attached kig construction an arc and a circle are constructed such that
the circle is the support circle of the arc. They should be exactly superposed, but they aren't (zoom in an area of size approximately 1)
Please note that:
- if exported in png format the precision error is present
- if exported in SVG (or other vector formats) the result is instead CORRECT!
This suggests that the problem is not in the kig "calc" engine, but somewhere else.
In my opinion this problems was not present in earlier kig versions (say kde2 or kde3), but it is there since quite some time.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Download the attached "bug.kig"
2. Zoom around an end-point of the arc (near the origin) such that the window size is of order one
The arc (thick line) is separated from the circle (thin line)
The arc should be perfectly superposed with the circle
Numerical precision cannot be blamed, this example is not that extreme!
Note that the same problem is present upstream after building from the latest
git sources. I opened the bug also upstream: https://bugs.kde.org/show_bug.cgi?id=359805
however it might be appropriate to also open a specific report for the fedora distribution (the one that I use).
There is a particularly simple workaround: comment out the method CircleImp::draw in objects/circle_imp.cc and objects/circle_imp.h forcing kig to draw circles as conics (which is actually the same used for generic curves).
This seems to imply that the problem with circles is in QT rather than kig
Created attachment 1133386 [details]
two tangent circles
The previous attachment (obsoleted) was probably not relevant to the problem.
The "steps to reproduce" in the bug description referred to that kig file
and are no longer valid. The present example is more selfexplanatory
Digging further it seems that the problem disappears by using QrectF in place of QRect. Note that this implies the creation of methods toScreenF alongside toScreen to produce a QPointF and a QRectF.
I am not receiving feedback from upstream...
Give David (to whom the upstream bug is assigned) more time to respond, it's been less that a week.
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 23 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The problem is no longer present in Fedora 24