• 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
Re: Drawing over a view's subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing over a view's subviews


  • Subject: Re: Drawing over a view's subviews
  • From: Nicko van Someren <email@hidden>
  • Date: Wed, 15 Jun 2005 17:58:12 +0100

On 15 Jun 2005, at 17:36, Mark Morrill wrote:

On 15-Jun-05, at 10:12, glenn andreas wrote:

You could also try overriding unlockFocus and do your drawing before calling [super unlockFocus], which is easier to implement, but doesn't allow the flexibility that a child window would...
This method looks good.

I'm not sure you're going to find this does what you need. I've not tested it on Cocoa but you can look at the GNUStep implementation of NSView to get an idea. Firstly the internal redraw code does not use unlockFocus at all (it uses the internal unlockFocusNeedsFlush:) and secondly it wraps the lock/unlock of the focus around the drawing of your view specifically and not around the drawing of any of the sub- views. I do not think that this will work.


The overlay window is an interesting option as is the non-opaque overlay view. But I think those options might have too much overhead. (sorry, couldn't resist.)

I can't see that one extra view in the view stack is really going to create much overhead at all. You're talking about putting entire Web Views inside the lower view; compared to rendering them the cost of layering a single extra view on top is probably tiny. Given that it is highly likely to do what you need I'd do it this way and if you have issue with the performance you should optimise that _after_ you have it working.


    Cheers,
        Nicko

_______________________________________________
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


References: 
 >Drawing over a view's subviews (From: Mark Morrill <email@hidden>)
 >Re: Drawing over a view's subviews (From: glenn andreas <email@hidden>)
 >Re: Drawing over a view's subviews (From: Mark Morrill <email@hidden>)

  • Prev by Date: Using Bindings with Distrubuted Objects
  • Next by Date: Re: Resizing a WebView
  • Previous by thread: Re: Drawing over a view's subviews
  • Next by thread: Re: Drawing over a view's subviews
  • Index(es):
    • Date
    • Thread