• 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
ATSUHighlightText permanently sets the refresh rect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ATSUHighlightText permanently sets the refresh rect


  • Subject: ATSUHighlightText permanently sets the refresh rect
  • From: Allan Odgaard <email@hidden>
  • Date: Thu, 4 Mar 2004 14:43:24 +0100

If I make a single call to ATSUHighlightText(), then all following redraws will flush the entire clipping rectangle that was active when the call was made to ATSUHighlightText.

To clarify, I have implemented drawRect in a Cocoa NSView subclass like this:

- (void)drawRect:(NSRect)rect
{
static bool didCall = false;
if(!didCall)
{
didCall = true;
ATSUHighlightText(layout, 0, 0,
kATSUFromTextBeginning, kATSUToTextEnd);
}
}

So only the first time that drawRect is called, will it draw the highlighted text. All further calls are no-op's.

I use Quartz Debug and enable "Flash screen updates (yellow)".

Each time my view is sent a drawRect:, the entire view flashes, no matter how small the rectangle (provided) is (I do return YES in isOpaque).

If I comment the ATSUI line, the flashing is gone.

If I resize my view to e.g. twice the size and again send it a redraw with a small rect, then the flashing rectangle has the size of the *original* view.

So somehow it seems that the ATSUI command will mark the entire clip rect dirty, and in a way that will make Quartz think that it is never flushed.

What actually happens here? is ATSUI buggy? is there a way I can inspect the dirty regions of Quartz for better debugging this problem?
_______________________________________________
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.


  • Follow-Ups:
    • Re: ATSUHighlightText permanently sets the refresh rect
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Re: Get *all* key events to display in NSTextField?
  • Next by Date: Dragging files to NSTextView ...
  • Previous by thread: Re: Get *all* key events to display in NSTextField?
  • Next by thread: Re: ATSUHighlightText permanently sets the refresh rect
  • Index(es):
    • Date
    • Thread