> int stretch(ggiBlt_t bob, int dx, int dy, int width, int height)
> {
>       double bob_xinc, bob_yinc;

Please don't use floating point ! It isn't needed and it's slow.
It's o.k. for a demonstration version, but please use Bresenham or
fixedpoint for a final one.

>       for (i = ystart; i < (width * height);) {
>               GetPixel((int)(bob_idx) - bob_ystart, (int)bob_y, &color);
>               PutPixel(dx + i - ystart, dy + y, color);

You will want to cache these both when looking up pixels and when writing
them out.

Cu, ANdy

-- 
= Andreas Beck                    |  Email :  <[EMAIL PROTECTED]>        =

Reply via email to