You may be better served to consider doing something like the way rulers are used in relation to a scroll view. If you choose an overlay that needs to keep synchronized with another view, look at how WebKit does this for its Inspect Element feature.
- Gary L. Wade (Sent from my iPhone) On Jul 20, 2011, at 12:55 AM, Daniel Vollmer <ma...@maven.de> wrote: > Hello, > > I have a visualisation application that displays multiple graphs (currently > using NSCollectionView, but possibly switching to an NSView-based NSTableView > in the future) that looks like this: > http://www.maven.de/code/wowplot/example_chains.png > > When you scroll sideways, the "title" of each graph stays in place, whereas > the rest of the content scrolls as usual. Currently, I simply redraw the > whole graph (well, the visible bit). This strikes me as rather inefficient, > because I essentially need to redraw the complete visible portion onScroll > instead of only the freshly revealed bit. > There are some things I can think of, but I'm unsure on which would be the > most appropriate way: > - Put an NSTextLabel inside the NSScrollView's contentView and dynamically > reposition it into the visibleRect. > - Add a largely transparent subview to the NSScrollView (so it's the same > size as the visible portion) and draw all titles in there, transforming > coordinates as needed. > > Preferably, the compositing would only happen once when the visibleRect > changes, not each frame (so the transparent blend doesn't each too much > graphics memory bandwidth). > > Has anyone got any experience with this or suggestions on which way would be > most appropriate? > > Thanks, > Daniel. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com