My application draws some images using cairo like this:
cairo_set_source_surface(cr, _page_down_icon, icon_x, y);
cairo_paint(cr);
where the page down icon is a png I loaded via cairo_image_surface_create_from_png
.
This works fine on standard screens but produces a low quality image on retina displays. So I'm thinking of having a second image with double resolution (as it is usual for NSImage). However, if I just draw this image the result is twice as large as the standard image. So my question is: how would I draw the highres image with cairo on a retina display so that it looks crisp?