I'm playing with some of the code from "A Taste of Smalltalk" and have a comment and question. First off it seems that Squeak doesn't implement the white: black: gray: etc. rectangle filling methods. I've gotten around this by just calling fillWhite:, etc from the DisplayMedium class. If anyone wants to pass on the actual definitions of white:, etc. I'd appreciate it.
My question is why does 'invert'ing a white display (on the Windows version of Squeak) produce pink? I haven't looked into this yet, figured I'd ask if anyone knows...I was sort of expecting black.
Cheers, S
------------------------------------------------------------------- VisualNewt Software: http://www.VisualNewt.com/ Makers of Newt'sPaper(tm), the premiere news reader for the Apple Newton(R) MessagePad(tm). -------------------------------------------------------------------
Attachment converted: Cog:Serg Koren (E-mail).vcf (TEXT/ttxt) (0000A1F4)
I'm playing with some of the code from "A Taste of Smalltalk" and have a comment and question. First off it seems that Squeak doesn't implement the white: black: gray: etc. rectangle filling methods. I've gotten around this by just calling fillWhite:, etc from the DisplayMedium class. If anyone wants to pass on the actual definitions of white:, etc. I'd appreciate it.
My question is why does 'invert'ing a white display (on the Windows version of Squeak) produce pink? I haven't looked into this yet, figured I'd ask if anyone knows...I was sort of expecting black.
Cheers, S
That protocol has changed with the advent of color. Try "fill:fillColor:" as in:
Display fill: (0@0 extent: 10@10) fillColor: Color white
Inverting does a bit-invert on each pixel value. In 8-bit color, the bit patterns for white and black on not bit-inverses of each other. If you set your display depth to 1, you'll get the black/white reversal effects discussed in the book.
When you get the code working, could you send it to us? It would be great to include an updated version of this example in an online-tutorial that follows "A Taste of Smalltalk"!
-- John
squeak-dev@lists.squeakfoundation.org