<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Imprecise stroke position at large coordinates when playing back a scaled recording surface"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94962">94962</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Imprecise stroke position at large coordinates when playing back a scaled recording surface
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>image backend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>teknos@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=122986" name="attach_122986" title="The code reproducing the error.">attachment 122986</a> <a href="attachment.cgi?id=122986&action=edit" title="The code reproducing the error.">[details]</a></span>
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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>