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

Re: NSQuickDrawView


  • Subject: Re: NSQuickDrawView
  • From: "Rafael K. Kobylinski" <email@hidden>
  • Date: Wed, 19 Sep 2001 14:29:06 +0200

At 14:30 Uhr -0700 24.07.2001, Scott Herz wrote:
What kind of drawing are you trying to do? NSQuickDrawView is there to provide a port for QuickDraw drawing, but that's not how most Cocoa drawing is done. Go to http://developer.apple.com/techpubs/ and click on the Carbon link for more info on how to draw using QuickDraw, or the Cocoa link for Cocoa drawing...

I assume that Jaime would like to do QuickDraw drawing in a Cocoa app (that's what NSQuickDrawView seems to be for, right?).

I also tried to use it - it is fairly simple with it's only documented method being qdPort. Assuming that it gives you the QuickDraw graphics port for the view, I tried to use it, but was surprised that this port would allow me to write to anywhere on the screen if I use the qdPort anywhere, but in the drawRect method.

It seems that the drawRect method is called with the current graphics port already set to the contents of the view. You can than use QuickDraw functions to draw there

When I tried to call qdPort outside this method, I got a port which would allow me to draw to any empty location (with no window) on the screen. This makes the qdPort method rather useless, because you can always get the current port with GetPort() anyway. I wonder if this is a bug in the implementation of NSQuickDrawView. I would be happy if someone could elaborate on the workings of this view.

--
Rafael K. Kobylinski Email: email@hidden
Institut f|r Informatik Tel. : ++ 49 89 289 22391
Technische Universitdt M|nchen Cell.: ++ 49 177 7 495020


  • Prev by Date: Re: Drawers -- problem solved
  • Next by Date: Obtaining an mage from a custom framework
  • Previous by thread: Re: simple genstrings question
  • Next by thread: Obtaining an mage from a custom framework
  • Index(es):
    • Date
    • Thread