[futurebasic] re: can you tell?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1998 : Group Archive : Group : All Groups

From: "Edwards, Waverly" <WEdwards@...>
Date: Thu, 31 Dec 1998 19:08:16 -0500
>>>> snip

>Is there a way to tell if a world is a gworld or a bworld by just
>passing the pointer to the world?

A GWorld pointer is a valid grafport pointer. Look into the pointer as 
though it were a grafport. Get the rowbytes field. If rowbytes% AND
&C000 
is anything other than zero, you have a more-than-one-bit-deep grafport.

Since your application always creates a GWorld for >1 bit uses, you know

that any colour grafport is also a GWorld.

-Mars

>>> end snip


Thanks so very much,


W.