Re: Subviews use superview's `drawRect' method?
Re: Subviews use superview's `drawRect' method?
- Subject: Re: Subviews use superview's `drawRect' method?
- From: Damien Sorresso <email@hidden>
- Date: Tue, 16 Aug 2005 11:03:09 -0500
On 16 Aug, 2005, at 10:35 AM, Fritz Anderson wrote:
More to the point: Does the box drawRect: stroke the framing
rectangle based on the NSRect passed to it? So that when the button
region is dirty it frames the button?
Here's the code for the `drawRect' method.
- (void)drawRect:(NSRect)rect {
NSBezierPath *fill = [NSBezierPath bezierPathWithRect:rect];
[[NSColor colorWithCalibratedRed:1.0f
green:1.0f
blue:1.0f
alpha:0.5f] set];
[fill fill];
[[NSColor grayColor] set];
[fill setLineWidth:1.5f];
[fill stroke];
}
Should I be stroking `bounds' and not `rect'?
--
Damien Sorresso
Macintosh Developer
Computer Infrastructure Support Services
Illinois State University
email@hidden
309.438.5777
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden