Visible to Intel only — GUID: GUID-A11E181D-3632-4590-A0FC-A65EE2A279B5
Visible to Intel only — GUID: GUID-A11E181D-3632-4590-A0FC-A65EE2A279B5
Setting Graphics Coordinates
You can set the pixel dimensions of the x- and y-axes with SETWINDOWCONFIG. You can access these values through the wc%numxpixels and wc%numypixels values returned by GETWINDOWCONFIG. Similarly, GETWINDOWCONFIG also returns the range of colors available in the current mode through the wc%numcolors value.
You can also define the graphics area with SETCLIPRGN and SETVIEWPORT. Both of these functions define a subset of the available window area for graphics output.SETCLIPRGN does not change the viewport coordinates, but merely masks part of the screen. SETVIEWPORT 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 SETVIEWORG. 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. SETWINDOW defines a window-coordinate system bounded by the specified values.
GETPHYSCOORD converts viewport coordinates to physical coordinates, and GETVIEWCOORD translates from physical coordinates to viewport coordinates. Similarly, GETVIEWCOORD_W converts window coordinates to viewport coordinates, and GETWINDOWCOORD converts viewport coordinates to window coordinates.
For more information:
On these routines, see their descriptions in the Language Reference.