Frage

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

War es hilfreich?

Lösung

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]
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top