From: Simon Bell (simonbell_at_mac.com)
Date: Fri Jul 08 2005 - 03:41:46 PDT
On 8 Jul 2005, at 4:59 am, Matthew Hudson wrote:
> Is there class information at the beginning of the bitmap object and
> if so - what is the structure of that?
Depends what you mean by 'the bitmap object'.
The structure returned by MakeBitmap is a NewtonScript frame:
bounds: <boundsrect, length 8>,
data: <pixels, length xxx>,
The data slot is a binary object containing a PixelMap, which is
probably what you want to mess with in C. A PixelMap is a classic
QuickDraw structure, adapted slightly for Newton, and defined in
NewtQD.h (which is in one of the DDKs, but I can't remember which):
short rowBytes; // pads to long
Point deviceRes; // resolution of input device (0 indicates
UChar * grayTable; // gray tone table
For sample code, check out my Image Stationery, which deals extensively
with bitmaps, at homepage.mac.com/simonbell/framework
If you'd like to send me code snippets (probably better off-list) I
could try to help you with this.
-- This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries Official Newton FAQ: http://www.chuma.org/newton/faq/ WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/
This archive was generated by hypermail 2.1.5 : Fri Jul 08 2005 - 08:00:02 PDT