Hi,
I've finally gotten around to writing a scaled version of ggiPutBox()
(before, i used to hack this in every other project):
/* put the contents of 'buffer' on the visual at pixel (x,y);
the size of 'buffer' is (w * h), the resulting image on the visual
will be (scale_factor*w * scale_factor*h) */
int ggiPutBoxScaled (ggi_visual_t vis,
int x, int y, int w, int h,
void *buffer,
int scale_factor);
Note that this is not a general zooming function, but a
pixel-doubling (or tripling, ..) routine, which should be fast.
If anyone is interested, I could write some general zooming routines;
but the following problem arises:
Not knowing exactly where to put it, I placed this in the 'misc'
extension, because that seemed to be the easiest way. However, I'm
_not_ "overloading" ggiPutBox as found in libggi/display/, but also
the ones in libggi/default/; How should I do this?
The function I have now works only for 8bpp X, and I've placed it in
extensions/misc/display/X/; of course I should add routines for many other
displays and bitdepths, but I couldn't figure out how to handle
overloading the "default/" routines. A big switch-statement handling
all bitdepths would be a possibility, but this would have to be copied
over to all targets using the "default/" routines.
Suggestions anyone?
--
Tijs van Bakel, <[EMAIL PROTECTED]>