Question

It appears that some images are incorrectly drawn, using their high-resolution equivalent, while others are fine. why is that ?

Was it helpful?

Solution

NSImage seems to forcefully choose @2x high-res images when drawn images are stretched

To avoid this, you can either choose to use NSDrawThreePartImage or NSDrawNinePartImage

These functions will avoid stretching by tiling-up patterns.

And if you really can’t use the above but want to avoid the 2x representation being used:

[NSImage setMatchesOnlyOnBestFittingAxis:YES]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top