• 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: NSView drawRect: QuickDraw, CoreGraphics, OpenGL ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView drawRect: QuickDraw, CoreGraphics, OpenGL ?


  • Subject: Re: NSView drawRect: QuickDraw, CoreGraphics, OpenGL ?
  • From: Finlay Dobbie <email@hidden>
  • Date: Sat, 12 Oct 2002 12:44:42 +0100

On Saturday, October 12, 2002, at 02:26 am, Brent Gulanowski wrote:

c) use CoreGraphics call. I am also unsure whether I can freely mix CoreGraphics calls and AppKit calls. Is NSGraphicsContext "toll free bridged" with CGGraphicsContext ?

I thought everybody knew you could use anything in Carbon / Core Foundation from Cocoa! As far as I know, yeah, all CGBleah object pointers can be transparently casted to NSBleahs pointers.

CGContexts are not CFTypes, and are definitely NOT toll-free bridged. However, see NSGraphicsContext.h:

// Platform specific drawing context (usually CGContextRef)
- (void *)graphicsPort;

d) Quickdraw. Can I use Quickdraw calls inside drawRect: and how ?

OMG that's blasphemous! 8^) I dunno, really. Quickdraw needs a GWorld or something. Underneath the NSView there is something, maybe it's that CGGraphicsContext you mentioned, that you can probably draw into. But seriously, there should be some CoreGraphics stuff you can use -- Quickdraw is implemented with it, isn't it? Come to think of it, isn't everything on OS X using Core this or BSD that when it talks to the kernel or hardware?

QuickDraw isn't just a wrapper for CG's drawing primitives, I don't think (QD is all bitmap-based, whereas CG tends to be vector-based)... Although it will eventually have to render into a CGContext, it just manipulates bytes in memory using traditional methods, AFAIK. Anyway, you can use NSQuickDrawView, although I'm not sure how good it is :-)

-- Finlay
_______________________________________________
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: NSView drawRect: QuickDraw, CoreGraphics, OpenGL ? DP.1
      • From: Nat! <email@hidden>
References: 
 >Re: NSView drawRect: QuickDraw, CoreGraphics, OpenGL ? (From: Brent Gulanowski <email@hidden>)

  • Prev by Date: Re: NSTableView cell's drawing backgrounds
  • Next by Date: Re: STL vector not working
  • Previous by thread: Re: NSView drawRect: QuickDraw, CoreGraphics, OpenGL ?
  • Next by thread: Re: NSView drawRect: QuickDraw, CoreGraphics, OpenGL ? DP.1
  • Index(es):
    • Date
    • Thread