Greetings. I wrote a small program that shows an object2D moving around on a canvas, and with a second object2D occluding the first when the first object2D moves so that it is 'behind' the occluding shape. I then put a control button to smoothly toggle the opacity of the occluder: that is, if the occluder is currently opaque (fill property = 100), then in the first tick of a timer after the button- press the fill will fall to 95, then in the next tick to 90 and so on down to 0. This progression is reversed for a move from transparent to opaque. All well and good, it works nicely and I'm happy. The problems arise when I use the .exe in windows: there is no smooth progression, but just opaque or transparent. Apparently intermediate values of the fill property (that is, anything other than 0 or 100) don't translate to windows.

Is anyone aware of a quick way to accomplish what I want to do, and which will work in windows?

If not, I can think of a workaround, but I need a bit of advice. I would guess that I could draw the moving object in one offscreen picture object, the occluder in another offscreen picture, then use the coordinates of the respective rgbsurfaces to draw the results in the canvas. Imagine a particular pixel: what is the color that should be placed in this pixel? I would guess that it should be something like pixel color in canvas = (occluder color x occluder fill) + (moving object color x (100 - occluder fill)) Does my impression of the way the fill property works (as embodied in the pseudocode above) look like the right way to represent it?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to