Hi.
>>Where should I take a look to see what's going on?
>Try this...
>
> Paragraph allInstancesDo:
> [:p | (p destinationForm class == DisplayScreen
> and: [p destinationForm ~~ Display])
> ifTrue: [p destinationForm: nil]]
I first made a select: of this and it came up empty. Ouch... not there.
>P.S. Have you looked at the alpha-blend drawing demos in Squeak? They
actually provide a sliding 32-bit buffer with alpha blending and anti-aliasing
for sketching. The screen depth can even be 8 bits and they work.
Ouch again... I had looked at the alpha blending demo, but I didn't know
why was it working and my stuff wasn't. So I changed the bitDepth to 32 and the
plotters worked fine, so I assumed it was my fault anyway but later got so
excited by the function plotters that I forgot the whole thing...
The plotting engine writes to aFormCanvas, which later is asked for its
form to copy it to the morph world's canvas in drawOn:. But it wouldn't display
translucent colors...
>Also, note that Squeak 2.2 introduced a new bitBlt mode supporting
copyBits of any source form at a given alpha value into EITHER 16 or 32 bits, so you
can do some alpha blend experiments now without having to go to 32 bits.
[more]
Hmmm... interesting... I was thinking about layerizing the function plotter
so every function plot will have a different layer and all of them will be
rendered into a single form for FunctionPlotterMorph>>drawOn:, and this will
come in handy.
I have another problem with the plotters. The form copying stuff is very
slow, imagine a 640@480 form being copied over and over... no way. So I wanted
to make plotting directly over the morph world canvas (and then keeping the
form corresponding to the plotter's bounds in such canvas to allow fast
dragging). It works and it looks great with alpha blending! But if the plotter's
morph is not included in the world's box... say for instance if the world has a
canvas from 0@0 to 640@480, the plotter has a bound size of 640@480 but its
position in the world is 100@100 and the right lower part falls outside, then
it won't draw correctly in the visible portion of the morph. It will draw
correctly say in the first 320@200 of the morph's bounds, the other parts will
remain the same and when I later ask the world's canvas for a copy of the
morph's bounds, I also get stuff outside the world's window...
I would like it to work properly, but I still haven't figured out how. It's
pretty rude on Morphic but the results are very nice.
Big thanks!
Andres.