[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] GTK graphics status
|
When a image has transparency (e.g. icons, gifs with transparent pixel),
SWT creates
a GdkPixmap for the color part of the image and a GdkBitmap for the mask.
We are using GdkPixBuf to scale the GdkPixmap. If we use a different
algorithm to scale the GdkBitmap, we might have problems, since different
algorithms might replicate different pixels.
So if we use our own algorithm the scale a GdkBitmap, I believe we will
have to
use it the scale its associated GdkPixmap too.
Right now, we are getting a GdkPixBuf with alha channel from the
GdkPixmap,
getting the mask data using GdkImage, combining them by replacing the
alpha
channel with appropriate values (e.g. 1 -> 255, 0 -> 0), scaling the
GdkPixBuf and
then redering to the destination drawable by calling
gdk_pixbuf_render_to_drawable_alpha.
This is somewhat inneficient though.
Silenio
Havoc Pennington <hp@xxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
03/18/02 07:00 PM
Please respond to platform-swt-dev
To: platform-swt-dev@xxxxxxxxxxx
cc:
Subject: Re: [platform-swt-dev] GTK graphics status
Silenio_Quarti@xxxxxxx writes:
>
> On Motif, we used XImage to get data from a Pixmap, scale the
> data using our own algorithm and then put the data in a new
> Pixmap.
>
That's probably a reasonable solution. Converting 1-bit data into a
pixbuf seems kind of wrong.
GdkImage is just like XImage so the Motif code should port easily.
Havoc
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev