1.1

FAST BITMAP STRETCHING

Tomas MÖller,     Lund Institute of Technology, HöganäUs, Sweden

Publisher Summary

This chapter presents an integer algorithm for stretching arbitrary horizontal or vertical lines of a bitmap onto any other arbitrary line. The algorithm can be used in drawing and painting programs where near real-time or real-time performance is required. Examples of application areas are enlarging and diminishing rectangular areas of bitmaps and wrapping rectangular areas onto, for example, circular areas. The routine itself is very simple, and most computer-graphics programmers are familiar with the Bresenham line-drawing algorithm that it is based upon. In fact, it could be based on any line-drawing algorithm To improve the algorithm, ...

Get Graphics Gems III (IBM Version) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.