On Mon, 25 Feb 2002, Angus Leeming wrote: > void GImageXPM::scale(GParams const & params) > { > if (!xpm_image_) > return; > > }
The principle behind scaling is simple: It's raytracing. So, for each destination pixel, calculate which pixel it corresponds to in the source picture. >From this point on, the rest is just optimizations, and you do not need those for starters. I think you can manage from this point. If not, I can provide you with the needed bits. If you want to make it nice, you also do linear interpolation in the case of floating source coordinates. Help this helps, Asger