mgraphics Image() differs from standard drawing on 2x / Retina displays ?

tyler mazaika's icon

I'm making some jspainter files for tab/live.tab which cache the "unselected" state for the whole set of buttons as an Image().

It seems like if I don't make my mgraphics context for the cached image 2x resolution (and then downscale during paint() ), it always looks blurry.

Compare the text in the yellow image and with the blue image where the cached Image() was drawn at 2x.

This seems weird because if I just draw everything on the fly the appropriate scaling happens automatically.

Is that expected behavior?

tyler mazaika's icon

FWIW the least painful solution seems to be to use scale(2, 2) when when drawing the cached image (on a 2x-sized canvas) and then scale(0.5, 0.5) before calling image_surface_draw() in the target drawing space.