Bug 54732 - cairo_copy_path converts device to user instead of backend to user
Summary: cairo_copy_path converts device to user instead of backend to user
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.2
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
: 54446 (view as bug list)
Depends on:
Reported: 2012-09-10 13:37 UTC by Benjamin Berg
Modified: 2012-09-10 15:48 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Description Benjamin Berg 2012-09-10 13:37:18 UTC
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.
Comment 1 Chris Wilson 2012-09-10 14:12:53 UTC
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>
Comment 2 Dominik Röttsches (drott) 2012-09-10 15:48:54 UTC
*** 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.