[ENH] Bob's World Gradient (was: Re: Code Challenge !!!)
Raab, Andreas
Andreas.Raab at disney.com
Sat Mar 25 09:50:47 UTC 2000
Doug - Just to make my point, enclosed is a change set that does what you
want (it'll be in the next bunch of updates). File it in, go to 8bpp display
depth and execute:
0 to: 255 do:[:i|
(FormCanvas on: Display)
fillRectangle: (0 at 0 extent: 400 at 400)
color:(Color gray: i / 255.0).
i printString displayAt: 0 at 0.
(Delay forMilliseconds: 100) wait].
[Note - for comparison you may want to try this without the update]
Have fun,
Andreas
> -----Original Message-----
> From: Raab, Andreas [mailto:Andreas.Raab at disney.com]
> Sent: Friday, March 24, 2000 5:53 PM
> To: squeak at cs.uiuc.edu
> Cc: recipient list not shown
> Subject: RE: [ENH] Bob's World Gradient (was: Re: Code Challenge !!!)
>
>
> > Maybe I'll try to work on this at some point. Hmm, now where in the
> > FillStyle hierarchy would HalftoneFillStyle be most appropriate...
>
> From my point of view - nowhere. You were talking about a
> *very* specific
> representation of Colors for a pixel based output device and
> there is no
> point in specifying a pixel pattern if you really mean a
> color (that's what
> you mean, isn't it?!) If you want to do halftoning on the fly
> the right
> place to do this is in class FormCanvas and nowhere else. So that, for
> instance, a PostScriptCanvas gets what is intended - the
> color - rather than
> some yet-to-be-guessed-at pixel pattern. In fact, I have
> already submitted a
> change set that tries to get rid of such a usage (for colors
> as well as
> combination rules) because it is absolutely necessary to
> state what you
> -mean- rather than handing in some obscure bits. If you mean
> a color, then
> pass a color. The canvas is the thing you want to make smart enough to
> realize that on an 8bit form it might be a good idea to use a
> dither pattern
> rather than the nearest color.
>
> - Andreas
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1972Halftoning-ar.cs
Type: application/octet-stream
Size: 5006 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000325/71ff9dad/1972Halftoning-ar.obj
More information about the Squeak-dev
mailing list
|