[Newbie]PaintBoxMorph enhancement question

Bob Arning arning at charm.net
Sat Apr 22 19:21:28 UTC 2000


On Sat, 22 Apr 2000 20:28:08 +0200 Karl Ramberg <karl.ramberg at chello.se> wrote:
>I've been playing with the PaintBoxMorph trying to enhance on the
>drawing cursor and found a paintbrush cursor that was used but
>not visible (?)(Try the changeset). Also I wanted to make the brush like
>the precision
>brush in Photoshop a one pixel ring the size of the brush, xor(reverse?)
>to the background.
>Now I got a paintbrush, a white square with a one pixel border the size
>of the brush,
>transparency does not work and the bigger the extent of the brush the
>more white space I get.
>Anybody care to shed some light on this for me ?

Karl,

I can tell you how to fix it without being completely sure why. If after:

	  	ff _ currentCursor copy: larger.

you also say:

		ff colors at: 1 put: Color transparent.
		ff colors at: 2 put: Color transparent.

then you will get the effect I think you are looking for. The first two entries in the ColorForm's color map have special significance (background and foreground, I think). They were, respectively, white and black (or the very dark blue that stands for black) in the form you were working with and it appears that somewhere ther was a conflicting assumption that Transparent meant the first slot.

Cheers,
Bob





More information about the Squeak-dev mailing list