discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linker problems while building GWorkspace on Mac OS X


From: Fred Kiefer
Subject: Re: linker problems while building GWorkspace on Mac OS X
Date: Sat, 10 Nov 2001 15:34:31 +0100

Richard Frith-Macdonald wrote:
> 
> On Thursday, November 8, 2001, at 12:48 PM, Enrico Sersale wrote:
> 
> >>> Can someboby suggest a method to get a general background color?
> >>>
> >>
> >> Not sure how this works under GNUStep, but in MOSX you can just set a
> >> transparent color as background:
> >> [field setBackgroundColor:[NSColor clearColor]];
> >>
> >> Cheers,
> >>
> >> Andreas
> >
> > No, under GNUStep this returns black :-((((
> 
> Well I imagine that's a bug ... so the best solution would be to fix the
> bug and use
> a transparent background color ... unfortunately I have no real idea how
> easy that
> would be.

It is a bit more complicated than just a bug. In GNUstep [NSColor
clearColor] is, as defined by the OpenStep specification, a colour of
zero alpha value, which should be drawn as transparent. So this itself
is implemented correctly. 
In the xgps backend, which is the backend we probably all use, alpha
values are not handled the way they should. I already wrote about this
some time ago when I made proposals of things to do for the next GNUstep
release. In short we currently use the alpha value to mix two images
together, but don't use it when drawing. A change here would require a
different drawing model, that won't fit that close to the X Windows
drawing model. So we either have to implement all the basic drawing
stuff ourselves or use another library that will do it for us. (Current
extensions of the X drawing code or something like libart or fitz)

As for the special case of zero alpha, we could add a quick hack to not
draw at all. Of course I would prefer the general solution, but this
could help a bit in the short run.

Fred





reply via email to

[Prev in Thread] Current Thread [Next in Thread]