• 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
Anybody know how to use NSHighlightRect ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Anybody know how to use NSHighlightRect ?


  • Subject: Anybody know how to use NSHighlightRect ?
  • From: Robert Miller <email@hidden>
  • Date: Fri, 4 Oct 2002 16:09:00 -0400

Hello, please help,

Here goes another one of those seemingly basic questions that has eroded some of my brain trying to figure out. Does anyone know how to use NSHighlightRect ? I am trying to implement a live selection rectangle which tracks mouse dragged and changes the size of the rect from an anchor point. I'm keeping track of the last rectangle and the new rectangle coordinates and calling the following sequence.

[self lockFocus];
NSHighlightRect(lastRect);
NSHighlightRect(newRect);
[self unlockFocus];

I thought that NSHighlightRect was supposed to take care of the drawing 'mode' using the current highlight color and provide a clean efficient selection rect without the need to incur the overhead of an actual view display call. I've tried changing the current foreground color, etc just to see if anything happens but, nothing is drawn at all, even if I never call it for the 'lastRect' you'd think that there would at least be a rect drawn that doesn't erase any old areas. I could swear that I saw NSHighlightRect work in the past. Am I missing something (besides a few million brain cells) ?

Thanks for any insight,
Regards,
Bob M.
_______________________________________________
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.

  • Prev by Date: Duplicating the Save Panel "Where" toggle
  • Next by Date: [Q] Assertion failure in -[NSThemeFrame lockFocus]
  • Previous by thread: Duplicating the Save Panel "Where" toggle
  • Next by thread: Re: Anybody know how to use NSHighlightRect ?
  • Index(es):
    • Date
    • Thread