Re: Drawing shadows under views
Re: Drawing shadows under views
- Subject: Re: Drawing shadows under views
- From: Ryan Bates <email@hidden>
- Date: Tue, 17 Feb 2004 11:13:21 -0800
On Feb 17, 2004, at 10:59 AM, Jeremy Dronfield wrote:
I read the NSShadow docs while trying to work out what to do. The docs
state that NSShadow can be applied as an attribute to text, but do not
mention any other use. In addition I went all up and down the
inheritance hierarchy looking for methods which would allow an
NSShadow to be applied to a view or control. No luck. How would you do
it?
From the NSShadow documentation:
- (void)set
Sets the shadow of subsequent drawing operations to the shadow
represented by the receiver. The shadow attributes of the receiver are
used until another shadow is set or until the graphics state is
restored.
This means the next time you draw something it will have that shadow.
For example, if you create a NSBezierPath rectangle and set the shadow,
when you call [path fill] the shadow will be drawn "underneath" the
rectangle. You should save the graphics state before setting the shadow
and restore it after drawing so everything after that won't be drawn
with a shadow.
Ryan
_______________________________________________
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.