BitBlt endianness

Andreas Raab andreas.raab at gmx.de
Fri Jun 16 23:13:58 UTC 2006


Gerardo Richarte wrote:
>     I saw that there are some references to color depths of -32 -16 -8
> and so. Any idea what this are for? I tried them, but nothing happened
> (like nothing).

That is probably because you were doing something like here:

	form := Form extent: Display extent depth: -16.
	Display displayOn: form.
	form displayOn: Display.

The reason why you don't see any difference is simply that the 
conversion happens *twice* once when blitting from the display and once 
when blitting to it (and besides, the whole point of BitBlt is to deal 
with the difference automatically so it's quite natural that you can't 
observe any effect as long as Display functions properly).

To see the actual effect (e.g., the difference in the bits) you need to 
manipulate the form's depth variable like here:

	form := Form extent: Display extent depth: -16.
	Display displayOn: form.
	form instVarNamed: 'depth' put: 16.
	form displayOn: Display.


Cheers,
   - Andreas



More information about the Squeak-dev mailing list