[BUG][FIX] Pen trails form depth (updated version fixes World trails, too)

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Fri Jul 4 17:38:45 UTC 2003


"Change Set:		colorSeesTrails-bf
Date:			4 July 2003
Author:			Bert Freudenberg

Makes the pen trail form use the display depth instead of 8 bits. This 
lets the color:sees: test work on pen trails, too (otherwise there 
likely is a color mismatch).  Also makes trails visible to the color 
seer if they are on the World background, not just in playfields."


Am Freitag, 04.07.03 um 16:38 Uhr schrieb Bert Freudenberg:

> Am Freitag, 04.07.03 um 14:46 Uhr schrieb Jeff Longland:
>
>> I'm a new Squeak user and I'm not trying to tackle anything too 
>> difficult at
>> the moment, or at least I didn't think so initially.  I'm working on
>> creating an object (a snake) that will travel along the edge of a 
>> rectangle
>> while leaving a trail.  As the snake works around the rectangle and 
>> comes
>> back to its starting point, the snake will view the existing trail as 
>> the
>> new wall - making smaller and smaller rectangles, until the snake has
>> covered the surface area of the rectangle.  Ideally, I'd like to be 
>> able to
>> move the snake object into any shape and it will cover the surface 
>> area in
>> the same manner as the above mentioned rectangle.  I've been using 
>> penDown
>> to create a pen trail behind the snake, but my major problem is that 
>> the
>> sensor on my object is unable to view the pen trail.  I've searched 
>> around
>> quite a bit and I've seen mention of transparent playfields, 
>> adjusting the
>> display depth, and a method that refreshes the playfield - but Squeak
>> documentation seems to be somewhat scattered.  I've been playing with 
>> Squeak
>> for a while now, and I'm slowly getting the hang of everything - but 
>> it's
>> taken quite a while.  Does anyone have any suggestions on how I can 
>> make the
>> pen trails visible to my sensor?  Or any other suggestions for the 
>> project
>> and my journey through Squeak?
>
> I would not consider this to be a newbie question, but rather a bug 
> report ;-)
>
> This indeed seems to be a problem with dithering. The pen trails use 
> an 8 bit color form, while the world is displayed in 16 or 24 bits. 
> This makes the color of the trails slightly different from the color 
> in the color-sees tile.
>
> Try the attached changeset. It makes the trails use the same depth the 
> display has. After installing, you need to clear the pen trails once. 
> See the attached picture for my implementation, I'm almost sure I did 
> this faster than Edgar :-)
>
> To install a changeset, open a file list, select the file, and chose 
> "file in".
>
> -- Bert

This new version makes trails in the World (on the "background") 
visible to the "color sees" test, too.

-- Bert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colorSeesTrails-bf.2.cs.gz
Type: application/x-gzip
Size: 996 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030704/3678e41f/colorSeesTrails-bf.2.cs.bin


More information about the Squeak-dev mailing list