Permalink
Browse files

Re-enabled tab image code in the ExampleProject

  • Loading branch information...
1 parent f134d07 commit 26255d29b0712ebab5465ac503d0d978351f503a @jspahrsummers jspahrsummers committed Jul 25, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 ExampleProject/ConcordeExample/ExampleView.m
@@ -87,19 +87,17 @@ Note by default scroll views (and therefore table views) don't
// 2. generate an inner shadow image based on the mask, then overlay that on top
// TODO: Refactor this to use NSImage.
- #if 0
- image = [TUIImage imageWithSize:imageRect.size drawing:^(CGContextRef ctx) {
+ image = [NSImage imageWithSize:imageRect.size drawing:^(CGContextRef ctx) {
CGRect r;
r.origin = CGPointZero;
r.size = imageRect.size;
CGContextClipToMask(ctx, r, image.CGImage);
CGContextDrawLinearGradientBetweenPoints(ctx, CGPointMake(0, r.size.height), (CGFloat[]){0,0,1,1}, CGPointZero, (CGFloat[]){0,0.6,1,1});
- TUIImage *innerShadow = [image innerShadowWithOffset:CGSizeMake(0, -1) radius:3.0 color:[TUIColor blackColor] backgroundColor:[TUIColor cyanColor]];
+ NSImage *innerShadow = [image innerShadowWithOffset:CGSizeMake(0, -1) radius:3.0 color:[TUIColor blackColor] backgroundColor:[TUIColor cyanColor]];
CGContextSetBlendMode(ctx, kCGBlendModeOverlay);
CGContextDrawImage(ctx, r, innerShadow.CGImage);
}];
- #endif
}
[image drawInRect:imageRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; // draw 'image' (might be the regular one, or the dynamically generated one)

0 comments on commit 26255d2

Please sign in to comment.