Hi,I thought I should bring this to the attention of the gtk+ team, invite comments, and take the opportunity to put a question or two.
I'm just finishing porting a Win32 program to linux using gtk+ 1.2. I'm proposing to release with the program a mini shared library which lumps together slight extensions to gdk and also gnome-print, just for use by the program.
The gdk stuff comprises a quick hack of code by Owen Taylor from the gdk-pixbuf library, providing a basic facility to scale a GdkImage. I don't know anything about scaling, but it seems to work adequately for my purposes.
The program displays charts drawn directly to the screen using gdk drawing functions. Under Win32, scaled-down versions of the charts are provided using the Window/Viewport scaling facility. They can be larger than the screen, so need to be scrollable. Under Linux, the chart is drawn to a pixmap, the pixels extracted to a GdkImage, this is scaled directly, and then drawn to the screen.
A couple of questions for the gtk+ team: 1 Why was this facility never provided in gdk 1.2 ? 2 Would it still be worth providing it in gdk 2 ? I attach the code for anyone interested. David J. Cooke
Attachment:
libwt-gdkimage-x.c
Description: Text document