Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: CGrafPtr or GrafPtr?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGrafPtr or GrafPtr?



In article <email@hidden>,
"George Birbilis" <email@hidden> wrote:

> > These are interchangable. GrafPtr comes from the old days when the Mac
> > has no color ports, obviously CGrafPtr is the color version. These days
> > you can freely cast from one to the other. At least on Windows although
> > I am pretty sure this is the case on the Mac.

They are "sort of" interchangable. If you are getting back a GrafPtr
from an API, and the port in question really is color, then yes -- they
are castable.

If the port really is b/w, you'll get some bad-looking color lookups if
you attempt to use QuickDraw for drawing full-color data (the colors
will all be threasholded to the classic 7 colors).

I'll also add that we recommend that applications using QuickTime create
color windows/ports/dialogs. While a black and white port/window/dialog
will still allow QuickTime movies to play back within it -- the code to
do so is non-optimal.

Since this is as simple as either making the proper call (ie, NewCWindow
rather than NewWindow) or placing the appropriate resource next to your
window/dialog template, there isn't a good reason not to do so.
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.

References: 
 >CGrafPtr or GrafPtr? (From: "George Birbilis" <email@hidden>)
 >Re: CGrafPtr or GrafPtr? (From: email@hidden (Chris Large))



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.