On Jul 10, 2006, at 7:08 PM, Charles Yeomans wrote:
Sure. See http://developer.apple.com/. A CGrafPtr is a pointer to
a CGrafPort struct. In it you'll find the portPixMap field, which
is a PixMapHandle. That's a handle to a PixMap struct, which
appears to contain a pointer to the raw bytes. Have fun.
Will I found the QuickDraw_Ref.pdf which seems to have most of the
answers that I was looking for. The other information on the Apple
Developer site referred to CGrafPtr quite a bit but it was quite
difficult to find the definition of the structure.
So now I am looking at the PixMap structure, but the PDF highlights
this section:
PixMap.baseAddr:
"For an onscreen pixel image, a pointer to the first byte of the
image. For optimal performance, this should be a multiple of 4. The
pixel image that appears on a screen is normally stored on a graphics
card rather than in main memory. Note that the baseAddr field of the
PixMap structure for an offscreen graphics world contains a handle
instead of a pointer. You must use the GetPixBaseAddr function to
obtain a pointer to the PixMap structure for an offscreen graphics
world. ****Your application should never directly access the baseAddr
field of the PixMap structure for an offscreen graphics world.****"
Then the PixMap defines the separation between rows, pixel format,
compression, color format, color tables (if required), and so on and
so forth.
It is a lot more work than I thought it would be just to gain direct
access to the individual pixels in the image... I think that I will
stick to the RB-only solution for right now.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>