December 2012
Intermediate to advanced
631 pages
13h 10m
English
Tomas MÖller, Lund Institute of Technology, HöganäUs, Sweden
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, ...
Read now
Unlock full access