• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
wantsDefaultClipping set to NO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wantsDefaultClipping set to NO


  • Subject: wantsDefaultClipping set to NO
  • From: Leonardo <email@hidden>
  • Date: Thu, 05 Dec 2013 22:03:44 +0100
  • Thread-topic: wantsDefaultClipping set to NO

I have to draw a NSShadow out of my NSViews' bounds.
So I overrided the wantsDefaultClipping methond returning NO.

That works, but not yet so well as I epxected.
For example, when I move the view and setNeedsDisplay:YES, the area outside
the view get not refreshed. So I subclassed setNeedsDisplay enlarging the
area to be refreshed.

- (void)setNeedsDisplay:(BOOL)flag
{
    [self.superview setNeedsDisplayInRect:NSInsetRect(self.frame,
-mInsetForShadow, -mInsetForShadow)];
}

Is it correct? As I have read on the docs, it's not recommended to draw
outside the bounds. So, I ask:

A) What's the purpose of the wantsDefaultClipping method?
B) Should I draw the shadow using a brand new NSView?
C) Or should I simply enlarge the view to draw the shadow? If so, I have to
change the origin and size of the view. Therefore, how can I adjust the
origin and size that the user enters on UI with the bound values I use in
the setFrameOrigin and setFrameSize ?


Regards
-- Leonardo


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: wantsDefaultClipping set to NO
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: WebView blocks User Interface
  • Next by Date: Re: wantsDefaultClipping set to NO
  • Previous by thread: Re: WebView blocks User Interface
  • Next by thread: Re: wantsDefaultClipping set to NO
  • Index(es):
    • Date
    • Thread