nanogui: How to draw image with transparency over another image ?
Subject:
How to draw image with transparency over another image ?
From:
Vladimir ####@####.####
Date:
30 Nov 2007 07:58:48 +0000
Message-Id: <ce55079f0711292358i7de6267amd91e8e0f7432a41@mail.gmail.com>
Hi,
I write nano-x based daemon, that should display battery indicator on
main screen.
Battery indicator is a series of PNG images with transparency.
Main screen (root window) has a picture as background.
And the question is - how to draw the PNG image over the window ?
I mean that if the battery state is changed that I should draw another
image on the same position, but of course the background will not
repaint by itself.
Is there any easy way to do so ?
Or I should save the image behind the battery indicator to some
offscreen pixmap and after each change of its state I should restore
the background and then draw the battery image ?