Using Intel® Visual Fortran to Create and Build Windows*-Based Applications
Setting Graphics Coordinates
You can set the pixel dimensions of the x- and y-axes with
. You can access these values through the
values returned by
also returns the range of colors available in the current mode through the
You can also define the graphics area with
. Both of these functions define a subset of the available window area for graphics output.
does not change the viewport coordinates, but merely masks part of the screen.
resets the viewport bounds to the limits you give it and sets the origin to the upper-left corner of this region.
The origin of the viewport-coordinate system can be moved to a new position relative to the physical origin with
. Regardless of the viewport coordinates, however, you can always locate the current graphics output position with
GETCURRENTPOSITION and GETCURRENTPOSITION_W
Using the window-coordinate system, you can easily scale any set of data to fit on the screen. You define any range of coordinates (such as 0 to 5000) that works well for your data as the range for the window-coordinate axes. By telling the program that you want the window-coordinate system to fit in a particular area on the screen (map to a particular set of viewport coordinates), you can scale a chart or drawing to any size you want.
defines a window-coordinate system bounded by the specified values.
converts viewport coordinates to physical coordinates, and
translates from physical coordinates to viewport coordinates. Similarly,
converts window coordinates to viewport coordinates, and
converts viewport coordinates to window coordinates.