Compaq Visual Fortran: A Guide to Creating Windows Applications

Chapter 9: Vector Graphics

9.1 Introduction

In this chapter, we concentrate on using vector graphics, and then in Chapter 10 we will explore the use of bitmapped graphics. If you have not already done so, it would be a good idea to read Chapter 5. Chapter 5 covers QuickWin graphics, and many of the ideas discussed there provide useful background knowledge for Win32 graphics. In particular, the discussion on coordinate systems and viewports should be reviewed because it also applies to Win32 graphics and is not repeated here. The correspondence between QuickWin graphics and Win32 graphics is hardly surprising given that QuickWin is a wrapper around a selection of Win32 API functions. QuickWin graphics provide users with access to the power of Win32 graphics while protecting them from its complexities. However, the Win32 graphic system provides programmers with greater power and flexibility compared with QuickWin graphics. Once the concepts and rules to be followed are understood, Win32 graphics are also surprisingly simple to use in an application.

The Win32 API functions used for displaying graphics on video displays and printers are contained in the graphics device interface (GDI) library. In Visual Fortran, use of the GDI functions is restricted to Fortran Windows projects. With the GDI, coordinate systems may be based on world coordinates or display coordinate systems. As is discussed later in this chapter, device contexts permit the GDI to provide graphics capabilities that are independent of the device being used for drawing on. A device context is used to maintain information about...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Computer Printers and Plotters
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.