Bug 54732 - cairo_copy_path converts device to user instead of backend to user
cairo_copy_path converts device to user instead of backend to user
Status: RESOLVED FIXED
Product: cairo
Classification: Unclassified
Component: general
1.12.2
Other All
: medium normal
Assigned To: Carl Worth
cairo-bugs mailing list
:
: 54446 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-10 13:37 UTC by Benjamin Berg
Modified: 2012-09-10 15:48 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***