nanogui: Thread: Doubts regarding Alpha Blending


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Doubts regarding Alpha Blending
From: "=?iso-8859-1?Q?Vidya_Srinivas?=" ####@####.####
Date: 12 Feb 2003 06:53:46 -0000
Message-Id: <1103.10.10.14.131.1045031552.squirrel@btlmail.bplmail.com>

Hi,

  We need to use Alpha blending for our application. We plan to use Nano-X.
Could you please tell us what are the necessary steps to be done for 
Nano-x to supoort Alpha blending, or is there any patch to support this 
functionality.

Also we would like to know if Truetype font is supported by Nano-X. IS it 
similar to microwindows?

Waiting for an early reply.

Regards,
Vidya.S
Sr. Design Engineer
Embedded Software Group
BPL Telecom Limited
Arikere
Bangalore
Ph - 6589080 extn - 2005


[Content type application/octet-stream not shown. Download]
Subject: Re: [nanogui] Doubts regarding Alpha Blending
From: Alex Holden ####@####.####
Date: 12 Feb 2003 09:44:19 -0000
Message-Id: <1045042458.1686.19.camel@hyperspace.local>

On Wed, 2003-02-12 at 06:32, Vidya Srinivas wrote:
>   We need to use Alpha blending for our application. We plan to use Nano-X.
> Could you please tell us what are the necessary steps to be done for 
> Nano-x to supoort Alpha blending, or is there any patch to support this 
> functionality.

I developed quite extensive alpha channel support early last year, but
it wasn't included in the last Microwindows release. It doesn't support
translucent window backgrounds though. If you want to have a look at my
alpha channel code, you can get a copy of my tree (which I haven't
worked on for months) from:
http://www.linuxhacker.org/pub/cvs-snapshots/microwin-aph/

The nbreaker game that's included is probably the best example of what
the alpha channel code can do (you'll need to enable PNG image support
in Nano-X for it to work properly though).

> Also we would like to know if Truetype font is supported by Nano-X. IS it 
> similar to microwindows?

Yes, if you set HAVE_FREETYPE_SUPPORT = Y in the config file.

-- 
------------ Alex Holden - http://www.linuxhacker.org ------------
If it doesn't work, you're not hitting it with a big enough hammer



Subject: Re: [nanogui] Doubts regarding Alpha Blending
From: ####@####.####
Date: 12 Feb 2003 11:46:04 -0000
Message-Id: <OFEC44BBF4.E740100E-ON80256CCB.003A50CC-80256CCB.003FD0E6@diamond.philips.com>

Hi,

On Wed, 2003-02-12 at 06:32, Vidya Srinivas wrote:
>   We need to use Alpha blending for our application. We plan to use Nano-X.
> Could you please tell us what are the necessary steps to be done for
> Nano-x to supoort Alpha blending, or is there any patch to support this
> functionality.

There are two alternative alpha blending patches for Nano-X.  One written
by Alex, and one written by me at work (Philips Research).  Alex's patch
is available from his CVS, if you want the Philips patch I can send you a
set of diff files.

The Philips patch adds support for a framebuffer in 32-bit with alpha mode
(RGBA).  It supports alpha blending when doing any drawing operation - lines
and shapes as well as images.  This is needed for interactive TV, such as MHP
(www.mhp.org).  It's also useful for implementing Java2D graphics (e.g. J2ME
PBP - Java 2 Micro Edition Personal Basis Profile).  However, it doesn't (yet)
have support for alpha blending if the destination isn't a 32-bit display -
it is designed so that this could be added, but it's not something I'm going
to do at work.

Alex's patch is more restricted, but it has the advantage of working now
with (almost?) all display targets.  Alex's patch supports drawing images
with a constant alpha or with an alpha map.  The nxbreaker demo uses this
to draw images that are semi-transparent and fade out at the edges.  AFAICS,
it doesn't support drawing graphics primitives (lines, shapes) with alpha.

Kind regards,

Jon Foster
--
Philips Research Laboratories, Redhill, England
E-mail: ####@####.####


Subject: Re: [nanogui] Doubts regarding Alpha Blending
From: Alex Holden ####@####.####
Date: 12 Feb 2003 12:17:31 -0000
Message-Id: <1045051650.2504.13.camel@hyperspace.local>

On Wed, 2003-02-12 at 11:33, ####@####.#### wrote:
> Alex's patch is more restricted, but it has the advantage of working now
> with (almost?) all display targets.  Alex's patch supports drawing images
> with a constant alpha or with an alpha map.  The nxbreaker demo uses this
> to draw images that are semi-transparent and fade out at the edges.  AFAICS,
> it doesn't support drawing graphics primitives (lines, shapes) with alpha.

Actually, my code supports blending of any window or pixmap to any other
window or pixmap. The pixmap or window content doesn't have to be loaded
from an image file. You can blend anything you want by drawing it to an
offscreen pixmap and then blending the pixmap to the screen. IIRC the
nxbreaker demo does something like that with the score text at the top
of the screen.

-- 
------------ Alex Holden - http://www.linuxhacker.org ------------
If it doesn't work, you're not hitting it with a big enough hammer



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


Powered by ezmlm-browse 0.20.