Window drop shadows
Andrew Hodgkinson (6) 465 posts |
This topic has been imported from the old forum. Due to its use of fixed format text, you may need to make your browser view wider in order to see posts with the correct layout. |
GavinWraith (26) 1563 posts |
This is somewhat related to the question of Wimp window border size calculations. Letting windows have shadows is a powerful 3D effect. Ideally the shadow's thickness would depend on the height of a window in the stack of windows, at any point, but this would be far too expensive to cater for. The easiest approximation is to reserve some toolsprite real estate for the shadow on the sides opposite the source of illumination. |
Steve Revill (20) 1361 posts |
GavinWraith (26) wrote: > This is somewhat related to the question of Wimp window border size > calculations. Letting windows have shadows is a powerful 3D effect. > Ideally the shadow's thickness would depend on the height of a window in > the stack of windows, at any point, but this would be far too expensive > to cater for. The easiest approximation is to reserve some toolsprite > real estate for the shadow on the sides opposite the source of > illumination. You could go one further and ask for the biggy: support for opaque windows in the Wimp. If you could specify an opacity for a window you could always have the equivalent of a pane window (but with no border and a (say) black workarea background colour at 50% opacity sat under but slightly offset from your window. Handling it would be exactly the same as for age-old pane windows. Nice. :) More to the point, supporting opacity in windows (a HUGE job, by the way) would certainly help to make the RISC OS desktop look less '90s and more in keeping with other contemporary desktops. |
Andrew Hodgkinson (6) 465 posts |
Steve Revill (20) wrote: > You could go one further and ask for the biggy: support for opaque > windows in the Wimp. We already have that. ITYM support for translucent windows :-D |
Steve Revill (20) 1361 posts |
Andrew Hodgkinson (6) wrote: > Steve Revill (20) wrote: > >> You could go one further and ask for the biggy: support for opaque >> windows in the Wimp. > > We already have that. ITYM support for translucent windows :-D He, he. I did of course mean "variable opacity". Which would logically lead on to non-rectangular windows. |
nemo (145) 2529 posts |
I implemented soft drop shadows (Mac OS style) using a Wimp filter, monitoring window repositions and maintaining a list of shadowed regions which got post-processed on-screen. Flickery as hell of course, because of the screen-addressing pitfall – RO applications must redraw directly to the screen, not an off-screen buffer. Consequently every time a window moved, its shadow had to move, which meant that the newly-exposed underlying window AND that area that was shadowed had to be redrawn, and then the shadow reapplied. I could have cached the original screen content before applying the shadow, but I lost interest at that point (with RO, pretty much). You’d only need an off-screen buffer the size of the screen of course, but that’s another story. |