One of the most interesting and fun parts o! a programming language, is its graphics elements. In general, graphics fall into two major categories: vector and bitmap. Vector graphiCs.are images generated by graphics commands such as the Line and Circle commands. Biimap graphics are images that can be displayed ‘on various controls and processed on a pixel-by-pixel basis. The difference between vector and bitmap graphics is that vector graphics aren’t tied to a specific monitor resolution; that is, they can be displayed at various resolutions. Figure 6.1 shows an interesting curve that was designed with the Spiral application, which we’ll explore later in the chapter. The vector image on the left was generated with drawing commands, and the image on the right is the equivalent bitIriap.
Figure 6.2 shows a’detail of the same curve. The curve designed with drawing commands (the vector image) looks just as good when enlarged, whereas the bitmap .reveals its blocklike structure. The vector drawing can be easily generated at the new resolution, but the bitmap can only be enlarged. And as you know, you can’t blowup an image without some loss in quality. On the printed page, Figures 6.1 and 6.2 may not reveal the detail of the vector and bitmap drawing. J: pite their inherent limitations, bitmap graphics are quite useful and much more common than vector graphics. For example, you can’t create the image of a landscape with graphics commands. On the other hand, it doesn’t make sense to display the bitmap of a circle when a simple Circle command can produce type same image faster and cleaner. Both types of graphics have their place, and yeu can mix them to produce the desired result.
This chapter explores both types of graphics and the many Visual Basic tools for manipulating them.