osx - How to get CGImageForProposedRect to provide 1:1 pixel data on Retina Mac -
In our app, we are creating a PDF NSImage
(hence scalable) and then This non-retina display works fine on Macintoshs to write that code to TIFF file in the CGMage
routine, but on the retina machines, the data that has returned, we expect twice that resolution (Like the screen).
The code we are using is forming a new NSView
reference to the data to draw subclass as a printmap view (the original on- Not a screen view).
NSData * pdfData = [printingMapView Datavith PDFInsert: frame]; NSImage * image = [[NSImage alloc] initWithData: pdfData]; [Image set size: size]; NSRactPrint = NSMKRCT (0, 0, [image size]. Wide, [image size] .high); CGImageRef cgImage = [Image CGImageForProposedRect: & amp; Reference Reference: Zero Signals: NULL];
I have seen around for any signal that can be assigned to Is there any way that passes the whole code's code It seems that there is a possibility of using too much memory during operation. CGImageForProposedRect: reference: signal / <> code, but anything in the Apple documentation related to content scale is not.
NSBitmapImageRep
and it's reference
as the parameter CGImageForProposedRect: reference: Hint
Then CGImageForProposedRect gives 1: 1 pixel data, if you are excluding a CGI image from that function The size of the NSImageRep should be twice the size of the NSImageRep, if it is double in size. Check your code to see if you have a call for NSMI Draw, where you are writing on a retina context. What was happening to me?
Comments
Post a Comment