Re: [NTLK] Structure of a Bitmap when passed to C

From: Matthew Hudson (hexsane_at_gmail.com)
Date: Fri Jul 08 2005 - 07:56:15 PDT


Thanks to both of you. The information I found online indicated:

ULong ignore;
UShort BytesPerRow;
ULong ignore2;

I guess if I wasn't in such a hurry to figure it out (not to mention
it was already time for bed and I had been working all day) I would
have discovered the problem.

Only other question regarding manipulating Bitmaps via C. Once the
Binary data is locked is it perfectly fine to use a standard pointer
and not bother with BlockMove(...) ?

-Matt

> The structure returned by MakeBitmap is a NewtonScript frame:
>=20
> {
> class: 'bitmap,
> bounds: <boundsrect, length 8>,
> data: <pixels, length xxx>,
> colordata: nil,
> mask: nil
> }
>=20
> typedef struct
> {
> Ptr baseAddr;
> short rowBytes; // pads to long
> short reserved1;
> Rect bounds;
> ULong pixMapFlags;
> Point deviceRes; // resolution of input de=
vice (0 indicates
> kDefaultDPI)
> #if defined(QD_Gray)
> UChar * grayTable; // gray tone table
> #endif
> } PixelMap;
>

-- 
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 - 09:00:01 PDT