Permalink
Browse files

Handle -[NSView isFlipped] when rendering the rootView of a TUIViewNS…

…ViewContainer
  • Loading branch information...
1 parent 70bed0d commit 05887163b5cf986770f7e278dc3241fc79ccec5d @jspahrsummers jspahrsummers committed Jul 28, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/UIKit/TUIViewNSViewContainer.m
@@ -163,7 +163,15 @@ - (void)drawRect:(CGRect)rect {
}
CGContextRef context = [NSGraphicsContext currentContext].graphicsPort;
+ CGContextSaveGState(context);
+
+ if ([self.rootView isFlipped]) {
+ CGContextTranslateCTM(context, 0, self.bounds.size.height);
+ CGContextScaleCTM(context, 1, -1);
+ }
+
[self.rootView.layer renderInContext:context];
+ CGContextRestoreGState(context);
}
- (void)startRenderingContainedView; {

0 comments on commit 0588716

Please sign in to comment.