@ccgus yes. Hard.
-
-
- View other replies
-
@gte Here's a sketch of a little solution I've come up with: https://gist.github.com/3124346 (cc@mjtsai) -
@ccgus Cool, thanks. And if you want to force double-resolution drawing you would just call CGContextScaleCTM? -
@mjtsai Yea- maybe I should add a scale param for that. I'm sure this class will evolve - right now I needed a quick fix for VP web export.
-
-
-
@ccgus Yeah, I found that, too. :( What do you recommend? I’ve been switching to using more Core Image… -
@mjtsai Working on a little class as a replacement. I'll stick it up on GitHub when done. - View other replies
-
@ccgus Cool. I’m kind of surprised that Apple’s High-Resolution doesn’t mention any of these sorts of issues.
-
-
-
@ccgus Define "kick you in the nuts" ? Always do 1x? Always do 2x -
@uliwitness If it's not drawing anywhere, it shouldn't do@2x. - View other replies
-
@ccgus And how would NSImage tell if it "isn't drawing anywhere" ? -
@uliwitness NSGraphicContext's isDrawingToScreen? -
@ccgus That's screen vs. printer. And NSImage resolution would need to depend on where you draw the finished image, which is usually screen.
-
-
-
@ccgus I have a very elegant block-based solution to this problem. Gonna see if I can share the source. -
@grynspan I'd love to see it (did you see mine here? https://gist.github.com/3124346 ) -
@ccgus I did. Mine takes the approach of just building two image reps and letting Cocoa pick when compositing. :)
-
-
-
@ccgus See ML AppKit release notes on the subject of lockFocus, and its recommended replacement. -
@boredzo Doesn't help me for 10.6 - View other replies
-
@ccgus True. Only older way that I know of that could work with HiDPI (pixel size != point size) would be NSCustomImageRep.
-
-
@ccgus lesson I learned was: don’t ever call -lockFocus. Always make a new bitmap image rep and go from there.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Gus Mueller
Guy English
Michael Tsai
Ghoulie Ghost Terror
Jonathan Grynspan
Petrifying Horror
Benjamin Stiglitz