nanogui: Transparent window with Nano-X


Previous by date: 14 Feb 2006 04:52:08 +0000 Re: displaying texts/fonts, Greg Haerr
Next by date: 14 Feb 2006 04:52:08 +0000 Re: Mapping, Unmapping, and Repainting Windows, Greg Haerr
Previous in thread: 14 Feb 2006 04:52:08 +0000 Re: Transparent window with Nano-X, Greg Haerr
Next in thread:

Subject: Re: [nanogui] Transparent window with Nano-X
From: "Greg Haerr" ####@####.####
Date: 14 Feb 2006 04:52:08 +0000
Message-Id: <038201c63122$6286ac40$6401a8c0@winXP>

: I also need to create a transparent window, for example,I create a label
widget.it has transparent property,How to carry out it ?

GrSetGCUseBackground only controls whether or not to
draw the current background color when drawing text.
To create a transparent window, you need to change
a window property so that the system never draws the
window's background color, set from GrNewWindow().
Use the GR_WM_PROPS_NOBACKGROUND
flag to GrSetWMProperties().

:
: how use GrCopyArea or GdBlit make alpha blend effect?
:
You'll have to study demos/mwin/malpha.c.  Then use
GrCopyArea/GdBlit with the MWROP_BLENDFGBG
op code.

Regards,

Greg




:
: nxLableCreate()
: {
:     wid=GrNewWindow(parent->wid,posx,posy,width,height,fgcolor,bgcolor,0);
: }
:
: nxLableDraw()
: {
:     if(transparent)
:     {
:         GrSetGCUseBackground(gc,GR_FALSE);
:     }
:     GrText(wid,gc,x,y,str,0);
: }
: regards,
: eric
: ----- Original Message ----- 
: From: "Greg Haerr" ####@####.####
: To: ####@####.#### ####@####.####
: Sent: Thursday, December 08, 2005 2:01 AM
: Subject: Re: [nanogui] Transparent window with Nano-X
:
:
: >> I want to create a transparent window using nano-X. What I'm trying to
: >> do is like that :
: >> There will be a window with some objects (geometrical figure) on top of
: >> that. But the background of the window should be transparent, so that
: >> anything on desktop below the window could be seen. There is a demo
: >> program named 'malpha' within '/src/bin/' which deals with
transparency.
: >> But that doesn't serve my purpose because background is not transparent
: >> here.
: >
: > The malpha demo shows that with external-to-server coding, it
: > is possible to simulate alpha blended surfaces with Microwindows.
: > This capability is not present in the server, however.
: >
: >
: >> Could anyone tell me whether this is really possible with Nano-X ? Or
: >> any idea about how to do this ?
: >
: > Well, it's certainly possible, but not without writing some tricky code
: > to add transparency handling to all windows and all refresh code.
: > I'd say its a pretty hard project.  If you really want to do this,
: > make sure you completely understand how malpha.c works,
: > as well as all the code in nanox/srvutil.c.
: >
: > Regards,
: >
: > Greg
: >
: >
: > ---------------------------------------------------------------------
: > To unsubscribe, e-mail: ####@####.####
: > For additional commands, e-mail: ####@####.####
: >
: >


Previous by date: 14 Feb 2006 04:52:08 +0000 Re: displaying texts/fonts, Greg Haerr
Next by date: 14 Feb 2006 04:52:08 +0000 Re: Mapping, Unmapping, and Repainting Windows, Greg Haerr
Previous in thread: 14 Feb 2006 04:52:08 +0000 Re: Transparent window with Nano-X, Greg Haerr
Next in thread:


Powered by ezmlm-browse 0.20.