Re: Unclear on NSView's isOpaque concept (and optimization in general)
Re: Unclear on NSView's isOpaque concept (and optimization in general)
- Subject: Re: Unclear on NSView's isOpaque concept (and optimization in general)
- From: Stéphane Sudre <email@hidden>
- Date: Thu, 6 Nov 2003 15:44:00 +0100
Le jeudi, 6 nov 2003, ` 14:51 Europe/Paris, lbland a icrit :
On Thursday, November 6, 2003, at 08:05 AM, Clark Cox wrote:
The order in which sibling views are drawn is completely undefined.
You have no way of knowing which of two overlapping views will be
drawn
first, and which will be drawn second.
you may be interested in these methods:
NSWindow:
- (void) useOptimizedDrawing: (BOOL) flag
Informs the receiver whether to optimize focusing and drawing when
displaying its NSViews. The optimizations may prevent sibling subviews
from being displayed in the correct order-which matters only if the
subviews overlap. You should always set flag to YES if there are no
overlapping subviews within the NSWindow. The default is NO .
The drawing is already optimized when the flag is no in the case I
described in a previous post. To have a perfect handling of overlapping
views, drawings should be clipped by taking into account the views
which are above the current view so that when you type text in a
NSTextView, the NSButton is not erased.
In the case of a NSMovieView, it could be possible to do this if you
use the clipping feature of the movie.
Yet, I never tried to implement this behavior in a GUI engine when you
add alpha blending to it. When you don't have alpha blending, it's not
too difficult.
_______________________________________________
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.