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.
Created attachment 128482 [details] [review] doc: Fix the units used by cairo_surface_create_similar_image
Created attachment 128483 [details] [review] doc: Clarify when the device scale is inherited and when it isn't
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.