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

有帮助吗?

解决方案

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]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top