Re: Quartz call to generate shadows?
Re: Quartz call to generate shadows?
- Subject: Re: Quartz call to generate shadows?
- From: email@hidden
- Date: Thu, 21 Feb 2002 23:37:44 -0800
Now that I think about it... Shouldn't the system draw a shadow behind
my NSControl subclass by default? It can't be the case that NSButton
and every other control draws its own shadow. I just noticed that the
shadows are drawn on the parent view, outside the frame of the
controls... So, should I expect a shadow to be drawn behind a custom
control? or not?
The system does not draw this for you; every control draws its own.
The frame you see in IB is not the true frame of the control. Select
something like an NSButton and go to the Size inspector in IB. Notice
the popup that lets you select the "frame" or the "layout rect". The
"layout rect" is what you normally see (and what the knobs around the
object always show); it is the rect that defines the boundary of the
object itself. But the "frame" is the true frame, and encompasses the
shadow as well. The control draws its own shadow inside its frame.
I'm not really sure why IB does this little bit of sleight of hand;
given that overlapping sibling views work poorly in AppKit, concealing
the true frame of a view is asking for trouble. But there it is.
As an aside, you can generate a nice shadow for an object using my app
Aquatint,
http://www.sticksoftware.com/software/Aquatint.html. I wasn't
going to pitch my stuff, but sine nobody else has given you a solution
that I've seen, I broke down... :->
Ben Haller
Stick Software
_______________________________________________
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.