• 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: Very small rect in drawRect:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very small rect in drawRect:


  • Subject: Re: Very small rect in drawRect:
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 28 Sep 2013 13:39:26 +0700

On 28 Sep 2013, at 12:21, Quincey Morris <email@hidden> wrote:

> On Sep 27, 2013, at 22:05 , "Gerriet M. Denkmann" <email@hidden> wrote:
>
>> The backtrace does offer me no clues:
>>
>> #1: 0x00007fff8d0f2140 AppKit`-[NSView _drawRect:clip:] + 4437
>> #2: 0x00007fff8d0eefb3 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 3058
>> #3: 0x00007fff8d0efa44 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5763
>> #4: 0x00007fff8d0efa44 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5763
>> #5: 0x00007fff8d0efa44 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5763
>> #6: 0x00007fff8d0efa44 AppKit`-[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] + 5763
>
> The backtrace does in fact offer clues. Your view needs redrawing, and the frameworks are breaking down the dirty region into non-overlapping component rects that are drawn separately. It just happens that this decomposition process leaves a tiny rect to be drawn separately.
>
> As to why it decomposes this way, my guess would be that your view has subviews (and/or controls) which are misaligned by a single pixel,
My CustomView (aka DriftView) has no subviews at all. It only has a superview: the ScrollView.

> changing what would otherwise be a nice rectangular dirty region into something slightly more complex.

Well, then this should always happen, shouldn't it?

But I just get:
	-[DriftView drawRect:] nice rect {{0, 0}, {1393, 189}}; visibleRect {{0, 0}, {1393, 189}}
whenever the view refreshes (via setNeedsDisplay: YES).
No other values for rect (I am not resizing the window).
For the 1-pixel rect I am still waiting - this does happen not very often.

Kind regards,

Gerriet.




_______________________________________________

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: Very small rect in drawRect:
      • From: Quincey Morris <email@hidden>
    • Re: Very small rect in drawRect:
      • From: Jens Alfke <email@hidden>
References: 
 >Very small rect in drawRect: (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: Very small rect in drawRect: (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Very small rect in drawRect:
  • Next by Date: Re: Very small rect in drawRect:
  • Previous by thread: Re: Very small rect in drawRect:
  • Next by thread: Re: Very small rect in drawRect:
  • Index(es):
    • Date
    • Thread