[futurebasic] Re: [FB] Can you tell?

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

From: Mars Saxman <marssaxman@...>
Date: Wed, 30 Dec 98 18:24:57 -0000
>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