Re: Fake Buttons <clear NSView>
Re: Fake Buttons <clear NSView>
- Subject: Re: Fake Buttons <clear NSView>
- From: email@hidden
- Date: Mon, 2 Jun 2003 21:08:03 -0400
I simply overrode NSView's hitTest: method to check the NSView's
bezierPath with containsPoint:, which makes the desired effect. Thank
you for your help
On Monday, Jun 2, 2003, at 18:28 America/New_York,
email@hidden wrote:
I meant:
[[NSColor clearColor] set];
[NSBezierPath fillRect: [self bounds]];
On Monday, Jun 2, 2003, at 18:15 America/New_York, John C. Randolph
wrote:
On Monday, June 2, 2003, at 01:47 PM, email@hidden wrote:
You are right. This works:
[NSBezierPath fillRect: [NSColor clearColor]];
Umm, this won't work. -fillRect: expects an NSRect struct, not an
NSColor object.
to fill a rectangle with a given color taking alpha into account, try
something like:
NSRect myRect = NSMakeRect(0,0,100,100);
NSRectFillUsingOperation(myRect, NSCompositeCopy);
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.