[mcclim-devel] opacity / translucency

Duncan Rose duncan at robotcat.demon.co.uk
Wed Jun 22 17:32:39 UTC 2005


On Wednesday, June 22, 2005, at 05:11  pm, nik gaffney wrote:

>
> hello,
>
> after some basic experimentation with setting the 'opacity' of various
> inks, and attempting to compose-in/compose-over, im unable to find an
> obvious way to blend freshly drawn pixels (eg. using draw-line*) over
> previously drawn pixels.
>
> is it at all possible using the x11 (or potentially the beagle)
> backend to draw transparent/translucent objects in mcclim panes? the
> clim reference suggests it should be, . ..
>

With regards only to Beagle...

Beagle doesn't support this. Theoretically you should only need to set 
the 'colour' of the line you're overdrawing with to have some sort of 
opacity and it should work; however I don't think there's an 
implemented method in McCLIM (yet) to set the opacity of an ink (this 
is what compose-in etc. are for), except when the ink is totally 
transparent or totally opaque and seemingly no method to get an opacity 
from a design (unless that design is actually an instance of an 
'opacity' object, which is how transparent parts of icons etc. work).

Certainly this functionality could be implemented quickly (in Beagle; 
in fact, Cocoa pretty much forces you to supply an alpha value in order 
to construct a valid NSColor object) but at the moment there are 
more... fundamental issues I need to address ;-)

> if such blending is not currently supported, could anyone suggest a
> method to simulate it?
>    (a partially flipping +flipping-ink+ ??)
>

Flipping ink is one of the fundamental things I was talking about 
earlier, at least as far as Beagle is concerned (it works in CLX, for 
solid designs at least). I don't think you will be able to achieve the 
effect you're looking for (but am looking forward to being wrong ;-) 
with McCLIM or either of the back ends as they stand.

-Duncan

> thanks,
> nik
>
>
>
>
> _______________________________________________
> mcclim-devel mailing list
> mcclim-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/mcclim-devel
>




More information about the mcclim-devel mailing list