• 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: Scrolling [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scrolling [SOLVED]


  • Subject: Re: Scrolling [SOLVED]
  • From: Graham Cox <email@hidden>
  • Date: Sat, 16 Jan 2010 09:47:38 +1100

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 (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: Scrolling [SOLVED]
      • From: David Blanton <email@hidden>
References: 
 >Scrolling (From: David Blanton <email@hidden>)
 >Re: Scrolling (From: David Blanton <email@hidden>)
 >Re: Scrolling [SOLVED] (From: David Blanton <email@hidden>)
 >Re: Scrolling [SOLVED] (From: Kyle Sluder <email@hidden>)
 >Re: Scrolling [SOLVED] (From: David Blanton <email@hidden>)

  • Prev by Date: Re: Scrolling [SOLVED]
  • Next by Date: Re: Unable to get animation of NSProgressIndicator on my custom view (subclassed)
  • Previous by thread: Re: Scrolling [SOLVED]
  • Next by thread: Re: Scrolling [SOLVED]
  • Index(es):
    • Date
    • Thread