2
目前我在定制的NSCell像这样绘制NSImage中下绘制阴影:NSImage中
- (void)drawInteriorWithFrame:(NSRect)theCellFrame inView:(NSView *)theControlView {
// roundedCornerImage creates a new NSImage with rounded corners, rather than clipping.
[[anIcon roundedCornerImage:5] drawInRect:anIconBox fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
}
很简单,我不知道如何绘制图像它的下面。在iPhone上,我可以通过以下方式来实现:CGContextSetShadow (currentContext, CGSizeMake(1, -1), 2)
;就在绘制UIImage之前,但我不熟悉如何在Mac上执行此操作。
任何指针都会很棒。
完美,作品一种享受! – 2010-04-20 22:46:23