[cairo-bugs] [Bug 94962] New: Imprecise stroke position at large coordinates when playing back a scaled recording surface
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Apr 16 09:25:25 UTC 2016
https://bugs.freedesktop.org/show_bug.cgi?id=94962
Bug ID: 94962
Summary: Imprecise stroke position at large coordinates when
playing back a scaled recording surface
Product: cairo
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: image backend
Assignee: chris at chris-wilson.co.uk
Reporter: teknos at gmail.com
QA Contact: cairo-bugs at cairographics.org
Created attachment 122986
--> https://bugs.freedesktop.org/attachment.cgi?id=122986&action=edit
The code reproducing the error.
When I record a stroke and a show_text() at the same location to a recording
surface, they show up at different locations during playback to an image
surface if
- the coordinates of the elements are large (dont appear around zero, do appear
around 20000)
- at certain scaling factors (not at integer scaling, but more pronounced at
1.6 or 1.87).
I attach a couple of images. They were created by the attached code.
Essentially I record two items on a recording surface (a line and a piece of
text) at the same vertical location (denoted by 'offset'). Then I play it back
to an image surface using 'scale' scaling. Since I will be using large offsets
I only replay the area
around the two items. (The bug remains even if I replay the whole recording
surface from (0,0) to the location items, but that would make comparison hard
and images large.)
The first number in the image name is the scaling factor (*100), the second is
the offset used.
The error seems to affect only the stroke, as you can see the text is always
positioned at the middle of the viewport (as intended). However, the stroke is
not drawn at the same location and the difference seems to depend on the offset
and the scale. It seems to be linearly increasing by the offset and seems to
vary somewhat randomly by the scale. For integer scales it does not appear.
Overall I suspect this is some form of a rounding error, but could not figure
this out even after some debugging.
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo-bugs/attachments/20160416/01bae748/attachment.html>
More information about the cairo-bugs
mailing list