Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread Nathan Vander Wilt
On Apr 13, 2008, at 7:15 AM, Carter R. Harrison wrote: CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; CGContextDrawLayerInRect(context, CGRectMake([self frame].origin.x, [self frame].origin.y, [self frame].size.width, [self frame].size.height), cgback); cgback

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread Carter R. Harrison
cgback is a CGLayerRef instance variable that I setup when the view is inited. I use the following line: cgback = CGLayerCreateWithContext(context, CGSizeMake([self bounds].size.width, [self bounds].size.height), NULL); It's my understanding that I do not need to retain cgback with

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread David Duncan
On Apr 14, 2008, at 11:56 AM, Carter R. Harrison wrote: cgback is a CGLayerRef instance variable that I setup when the view is inited. I use the following line: cgback = CGLayerCreateWithContext(context, CGSizeMake([self bounds].size.width, [self bounds].size.height), NULL); It's my

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread Carter R. Harrison
Hi David, I'm getting the reference to the context by using: CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; in my view's initWithFrame: method. Based upon what you said, how would you recommend I draw to a CGLayer prior to the first invocation of drawRect:

EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-13 Thread Carter R. Harrison
Hi Everybody, I'm delving into Quartz 2D programming for the first time so this is probably a newb issue, but either way I'm stumped. I have a controller that is calling several custom drawing methods in my custom view. The drawing methods call Quartz and tell it to draw various things