Conversation
mz2
commented
Mar 18, 2015
- Adds an optional relative scale parameter to the image context handler.
- Also fixes a compilation error in a scenario where source is being built without Foundation.h coming in via prefix header.
|
iOS too? |
|
Damn it, no. One moment... |
|
Oh, wait, but actually the iOS implementation has already |
|
So technically the iOS and Mac implementations are inconsistent (on iOS there's a |
It's more subtle that this. On iOS, the scaling has to be done by your code based on the device scale. On OS X, the NSImage implementation takes care of it and you render in the block at scale 1 no matter what (NSImage takes care of scaling based on the screen). This scaling is only exposed for the purpose of tests. On OS X, the tests render the NSImage instance in various... NSImage with different sizes, to mimick different screens. The "scale" you want to apply is different. It's not the screen scale, it's a custom scaling factor on top of that. Both implementations are consistent: no such factor exists at the moment. But it could be added. Also on iOS where it is not yet present in your branch ;-) |
|
Ok thanks for clarifying -- then I should indeed add this scale factor to iOS too. Is there an iOS target someplace public already, or shall I make one? |
Yes. And there are tests :-) |
|
zomg! |