When the user calls into cairo_copy_path, cairo will convert the path to user coordinates using "cairo_device_to_user". However, the path is stored in *backend* coordinates (converted using the function _cairo_gstate_user_to_backend). This means that the result of cairo_copy_path is shifted by the device offset of the target device. https://bugzilla.gnome.org/show_bug.cgi?id=681475 is an example where this causes troubles.
commit f34b87f6d76cbea93acd4a8c73c8c6a6b412a302 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Sep 10 15:09:18 2012 +0100 path: Convert from backend coordinates back into user coordinates Fixes regression from commit 83bfd85a1378e61b8bdc3f554f5e07900311f61f Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Apr 23 19:45:26 2010 +0100 Implement cairo_backend_t As there exists no public API to perform the operation we needed, and we failed to create one, the constructed path failed to correctly remove the device offset. Fixes copy-path under device translation. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54732 Reported-by: Benjamin Berg <benjamin@sipsolutions.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
*** Bug 54446 has been marked as a duplicate of this bug. ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.