Thanks for the link Ken, though confusion still persists.
Seems to be saying don't use -setFlipped: unless you really know what you're
doing. That concurs with your own advice about not using setFlipped unless
you're locking focus on the image to get a flipped context for drawing. I'm
not,
Did you read the explanation of flipped contexts vs flipped images, and how
to draw an image right side up into a flipped context?
Flipped contexts are not deprecated.
Do you have or can you obtain access to the 2007 WWDC videos? :-)
-Ken
On Thu, May 27, 2010 at 11:11 PM, Graham Cox
(Also, again for others following along, on 10.6 you just pass YES for
respectFlipped in -[NSImage
drawInRect:fromRect:operation:fraction:respectFlipped:hints:]. The
implementation is quite similar to the method Paul gives in the post.)
On Thu, May 27, 2010 at 11:17 PM, Ken Ferry
On 28/05/2010, at 4:17 PM, Ken Ferry wrote:
Did you read the explanation of flipped contexts vs flipped images, and how
to draw an image right side up into a flipped context?
Flipped contexts are not deprecated.
I understand that contexts can (still) be flipped.
Let's break this down a
On Fri, May 28, 2010 at 1:36 AM, Graham Cox graham@bigpond.com wrote:
I understand that contexts can (still) be flipped.
Let's break this down a bit, since I'm fighting two problems simultaneously
here. First, PDF File generation.
Using the code I quoted, I generate PDF data in a
Hallelujah!!!
Thanks Stephen, that's the piece of the puzzle I was missing. I was assuming
(or misinterpreting) that passing flipped:YES for the NSGraphicsContext
ACTUALLY FLIPPED the context, not just informed it that the context had been
flipped.
I found I had to set the CTM after the
Heh. Okay, glad that made sense, but as discussed in all the other
resources, yes, context flippedness is a piece of _metadata_ orthogonal from
the CTM. You may consult it to get the high level notion of which way
should be considered up.
On Fri, May 28, 2010 at 12:22 AM, Graham Cox
Thanks Kyle, that seems to look like a fruitful approach. I'm doing the
following, which appears to be enough, i.e. it works. But should I be doing
anything else?
NSSize size = [self bounds].size;
NSRect destRect = NSZeroRect;
destRect.size = size;
On Thu, May 27, 2010 at 8:40 PM, Graham Cox graham@bigpond.com wrote:
Thanks Kyle, that seems to look like a fruitful approach. I'm doing the
following, which appears to be enough, i.e. it works. But should I be doing
anything else?
NSSize size = [self bounds].size;