Permalink
Browse files

Set compositing mode to sourceover when doing advanced char drawing s…

…o emoji's don't draw transparent backgrounds through the window
  • Loading branch information...
1 parent 479a0a9 commit f67bed74e119e723e12247cdf437961d7fbb18f2 @gnachman committed Aug 10, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 PTYTextView.m
View
@@ -6077,6 +6077,9 @@ - (void)_advancedDrawChar:(unichar*)codes
color, NSForegroundColorAttributeName,
nil];
}
+ NSGraphicsContext *ctx = [NSGraphicsContext currentContext];
+ [ctx saveGraphicsState];
+ [ctx setCompositingOperation:NSCompositeSourceOver];
NSMutableAttributedString* attributedString = [[[NSMutableAttributedString alloc] initWithString:str
attributes:attrs] autorelease];
// Note that drawInRect doesn't use the right baseline, but drawWithRect
@@ -6109,6 +6112,7 @@ - (void)_advancedDrawChar:(unichar*)codes
lineHeight)
options:0]; // NSStringDrawingUsesLineFragmentOrigin
}
+ [ctx restoreGraphicsState];
}
- (void)_drawComplexCharRun:(CharRun *)currentRun

0 comments on commit f67bed7

Please sign in to comment.