• 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: How to draw a rectangle around a (graph) view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to draw a rectangle around a (graph) view?


  • Subject: Re: How to draw a rectangle around a (graph) view?
  • From: "I. Savant" <email@hidden>
  • Date: Wed, 25 Apr 2007 12:46:46 -0400

On 4/25/07, Arthur C. <email@hidden> wrote:
Question is how to draw the rectangle showing what part is to be captured
(the captureRect).
It is too large to be drawn from within the graphView. But where should it
be done then? I have nothing but an NSWindow and the two graph views. So
should it be done from the NSWindow? But then I would have to subclass the
NSWindow(?)


How about a borderless, transparent window floating above the capture area whose content view fills with a translucent color (with an alpha component of 0.2, for example)?


Another question: is it necessary to do all the drawing in the drawRect
method?

No, but all your drawing code gets initiated by -drawRect: ... check out the Sketch example in your /Developer/Examples folder. From within -drawRect: you can figure out what needs to be drawn and call other methods like "-drawMyGraphicInThisRect:", etc. See the documentation (search for Cocoa Drawing) to learn more.

--
I.S.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >How to draw a rectangle around a (graph) view? (From: "Arthur C." <email@hidden>)

  • Prev by Date: Re: text drawing question
  • Next by Date: Re: How to draw a rectangle around a (graph) view?
  • Previous by thread: Re: How to draw a rectangle around a (graph) view?
  • Next by thread: Re: How to draw a rectangle around a (graph) view?
  • Index(es):
    • Date
    • Thread