On 16/01/2010, at 9:19 AM, David Blanton wrote:

> - (void)drawRect:(NSRect)rect {
>       [super drawRect:rect];
>       
> ...   
>       if(m_scrolling)
>       {
>               NSLog(@"drawRect scrolling");
>               
>               float v = 100*[m_vScroller floatValue];
>               float h = 100*(1-[m_hScroller floatValue]);
>               m_main.m_bitmap.SetOrigin(h, v);
>       }
>       
>       
> ...
> 
> }


David, It's my belief that your drawing architecture is flawed. There should be 
no need/reason to modify the bitmap that you're displaying in the view when it 
scrolls. Instead, the dirty rects tell you which portion of the bitmap needs to 
be drawn/created. Think of the bitmap as your data model (even though it 
contains pixels). It has no business knowing the state of the view.

--Graham


_______________________________________________

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

Reply via email to