Bug 99094

Summary: docs: cairo_surface_create_similar_image accepts dimensions in pixels, not device-space units
Product: cairo Reporter: Debarshi Ray <rishi.is>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: doc: Fix the units used by cairo_surface_create_similar_image
doc: Clarify when the device scale is inherited and when it isn't

Description Debarshi Ray 2016-12-15 11:39:03 UTC
The cairo_surface_create_similar_image documentation says that the width and height are in device-space units. Instead they are in raw pixels. Basically the same unit used by cairo_image_surface_get_height, cairo_image_surface_get_width, etc..

It might also be nice to mention that cairo_surface_create_similar_image doesn't inherit the device scale, but cairo_surface_create_similar does.
Comment 1 Debarshi Ray 2016-12-15 11:42:26 UTC
Created attachment 128482 [details] [review]
doc: Fix the units used by cairo_surface_create_similar_image
Comment 2 Debarshi Ray 2016-12-15 11:50:41 UTC
Created attachment 128483 [details] [review]
doc: Clarify when the device scale is inherited and when it isn't
Comment 3 Bryce Harrington 2017-03-16 03:27:25 UTC
Thanks, pushed:

To ssh://git.cairographics.org/git/cairo
   10e4103..cffa452  master -> master

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.