nanogui: Thread: Transparent window with Nano-X


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Transparent window with Nano-X
From: Aveek ####@####.####
Date: 7 Dec 2005 08:05:45 +0000
Message-Id: <1133942781.12424.53.camel@localhost.localdomain>

Hi all,
	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. 
	Could anyone tell me whether this is really possible with Nano-X ? Or
any idea about how to do this ?

Thanking you all,
Aveek...

Subject: Re: [nanogui] Transparent window with Nano-X
From: "Greg Haerr" ####@####.####
Date: 7 Dec 2005 18:01:10 +0000
Message-Id: <053301c5fb58$38c22ab0$6401a8c0@gregnewport>

> 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

Subject: Re: [nanogui] Transparent window with Nano-X
From: "Greg Haerr" ####@####.####
Date: 8 Dec 2005 20:28:19 +0000
Message-Id: <08f601c5fc35$e59f3650$6401a8c0@gregnewport>

> Top Box (STB) where I want the transparency over the video plane. A STB
> generally contains three planes, namely - video plane, graphics plane
> and cursor plane. So I think if I run the 'malpha' demo program on a STB
> it will be displayed on Graphics plane. Now my question is that if I
> want to show the Video plane through the Graphics plane do I need to add
> some extra code to 'malpha' or the transparency of the Graphics plane
> over the Video plane is automatically handled by the Video/Graphics
> driver of STB ?

All hardware transparency will have to be specially handled
by your application code, by talking to the STB video/graphics
driver.  Nano-X will only draw on the graphics plane, and
knows nothing about other hardware planes.  When a window
receives an exposure message, then you'll likely want to
set parameters for the STB video plane.

Regards,

Greg



>
> Thanking you again.
>
> Regards,
> Aveek
>
> On Wed, 2005-12-07 at 10:01 -0800, Greg Haerr wrote:
> > > 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
> >
> >
> >
>
>

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: ####@####.####
: >
: >

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.