Re: [gtk-list] Pixmap Scaling



On Sun, 25 Jan 1998, Ronald Lembcke wrote:

> Hi!
> 
> I want to scale small (up to 32x32) images and then draw 'em into a 
> drawing area.... Are there already functions for this in gdk? Or is
> there an other library for such things? 

Not that I know of. But there will be a gdk compatible library available
soon (ie next week) when I release ElecticEyes for gtk/gnome and
gdk_imlib. Its a separate library you have to link in, but can do fast
pixmap scaling (actually it scales original 24-bit data into a pixmap). It
handles any bitdepth you're likely to ever use, and handles decent
dithering and colormap handling for 8bpp. It can also cache scaled pixmaps
and loaded images, load a pile of image formats.. well enough... it will
be out soon.

> I need the scalling for a Game with a 3D starchart... and open-gl seems
> to be a bit of an overkill... and what's more important... I don't understand
> it...
> As the Game is a turn based play-by-email game the scalling needn't be
> necessarily in realtime... 
> 
> Another question: Is there another widget than the drawing area for such
> things, as it's quite complicated to draw transparent pixmaps :-(

Is it meant to be the top-level window that is transparent, or just a
widget? If it's a widget, there's the gtkpixmap widget (see gtkpixmap.h) -
that can be transparent.. but you have to create and destroy it if it
changes. If it's a toplevel window you can just use the widget->window
window id, set the background pixmap, clear the window and set the shape
mask too. Infact you can do that to the drawing area as well, which means
you don't have to use the gtkpixmap widget.

> cu... >       Roni alias _crash
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
> 

--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com       /\___ /\ ___/||\___ ____/|/\___  raster@redhat.com
Carsten Haitzler           | _ //__\\ __||_ __\\ ___|| _ /  Red Hat Advanced
218/21 Conner Drive        || // __ \\_ \ | |   \ _/_|| /   Development Labs
Chapel Hill NC 27514 USA   ||\\\/  \//__/ |_|   /___/||\\   919 547 0012 ext 282
+1 (919) 929 9443, 801 4392   For pure Enlightenmenthttp://www.rasterman.com/ 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]