The graphics routines can be used in Standard Graphics applications and in Quickwin applications (see Section E.2). To use a graphics routine, do the following:
USE DFLIB
Table E-3 summarizes graphics routines.
Table E-3 Summary of Graphics Routines (WNT, W9*)
Name | Description |
---|---|
Routines for Color 1 | |
FLOODFILL | Fills an area using the current index and fill mask; fill starting point uses viewport coordinates. |
FLOODFILL_W | Fills an area using the current index and fill mask; fill starting point uses window coordinates. |
FLOODFILLRGB | Fills an area using the current RGB color and fill mask; fill starting point uses viewport coordinates. |
FLOODFILLRGB_W | Fills an area using the current RGB color and fill mask; fill starting point uses viewport coordinates. |
GETBKCOLOR | Returns current background color index for both text and graphics. |
GETBKCOLORRGB | Returns current background RGB color value for both text and graphics. |
GETCOLOR | Returns the current graphics color index. |
GETCOLORRGB | Returns the current graphics color RGB value. |
GETPIXEL | Returns the color index of a pixel; pixel is located using viewport coordinates. |
GETPIXEL_W | Returns the color index of a pixel; pixel is located using window coordinates. |
GETPIXELRGB | Returns the RGB color value of a pixel; pixel is located using viewport coordinates. |
GETPIXELRGB_W | Returns the RGB color value of a pixel; pixel is located using window coordinates. |
GETPIXELS | Returns the color indexes of multiple pixels. |
GETPIXELSRGB | Returns the RGB color values of multiple pixels. |
GETTEXTCOLOR | Returns the current text color index. |
GETTEXTCOLORRGB | Returns the RGB color value of the current text. |
REMAPALLPALETTERGB | Remaps an entire palette to an RGB color. |
REMAPPALETTERGB | Remaps one color index to an RGB color. |
SETBKCOLOR | Sets current background color index for both text and graphics. |
SETBKCOLORRGB | Sets current background RGB color value for both text and graphics. |
SETCOLOR | Sets the current graphics color index. |
SETCOLORRGB | Sets the current graphics color to an RGB value. |
SETPIXEL | Sets a pixel to the current graphics color index; pixel is located using viewport coordinates. |
SETPIXEL_W | Sets a pixel to the current graphics color index; pixel is located using window coordinates. |
SETPIXELRGB | Sets a pixel to an RGB color value; pixel is located using viewport coordinates. |
SETPIXELRGB_W | Sets a pixel to an RGB color value; pixel is located using window coordinates. |
SETPIXELS | Sets the color indexes of multiple pixels. |
SETPIXELSRGB | Sets multiple pixels to an RGB color. |
SETTEXTCOLOR | Sets the current text color index. |
SETTEXTCOLORRGB | Sets the current text color to an RGB value. |
Routines for Figure Characteristics | |
GETFILLMASK | Returns the current fill mask. |
GETLINESTYLE | Returns the current line style. |
GETWRITEMODE | Returns the logical write mode used when drawing lines. |
SETCLIPRGN | Masks part of the screen; it does not change the viewport coordinates. |
SETFILLMASK | Sets the current fill mask. |
SETLINESTYLE | Sets the current line style. |
SETWRITEMODE | Sets the logical write mode used when drawing lines. |
Routines to Convert and Set Coordinates | |
GETPHYSCOORD | Converts viewpoint coordinates to physical coordinates. |
GETVIEWCOORD | Converts physical coordinates to viewport coordinates. |
GETVIEWCOORD_W | Converts window coordinates to viewport coordinates. |
GETWINDOWCOORD | Converts viewport coordinates to window coordinates. |
SETVIEWPORT | Redefines viewport bounds to the specified limits and sets the viewport coordinate origin to the upper-left corner of this region. |
SETVIEWORG | Moves the viewport coordinate origin (0,0) to a specified physical point. |
SETWINDOW | Defines a window bound by specified window coordinates. |
Routines to Draw Graphics | |
ARC | Draws an arc using viewport coordinates. |
ARC_W | Draws an arc using window coordinates. |
CLEARSCREEN | Clears the screen, viewport, or text window. |
ELLIPSE | Draws an ellipse or circle using viewport coordinates. |
ELLIPSE_W | Draws an ellipse or circle using window coordinates. |
GETARCINFO | Returns the endpoints of the most recently drawn arc or pie. |
GETCURRENTPOSITION | Returns the viewport coordinates of the current graphics-output position. |
GETCURRENTPOSITION_W | Returns the window coordinates of the current graphics-output position. |
GRSTATUS | Returns the status (success or failure) of the most recently called graphics routine. |
LINETO | Draws a line from the current graphics-output position to a specified point using viewport coordinates. |
LINETO_W | Draws a line from the current graphics-output position to a specified point using window coordinates. |
LINETOAR | Draws a line between each x,y point in the from-array to each corresponding x,y point in the to-array. |
LINETOAREX | Draws a line between each x,y point in the from-array to each corresponding x,y point in the to-array; also specifies color and line style. |
MOVETO | Moves the current graphics-output position to a specified point using viewport coordinates. |
MOVETO_W | Moves the current graphics-output position to a specified point using window coordinates. |
PIE | Draws a pie-slice-shaped figure using viewport coordinates. |
PIE_W | Draws a pie-slice-shaped figure using window coordinates. |
POLYBEZIER | Draws a Bezier curve using viewport coordinates. |
POLYBEZIER_W | Draws a Bezier curve using window coordinates. |
POLYBEZIERTO | Draws a Bezier curve using viewport coordinates. |
POLYBEZIERTO_W | Draws a Bezier curve using window coordinates. |
POLYGON | Draws a polygon using viewport coordinates. |
POLYGON_W | Draws a polygon using window coordinates. |
POLYLINEQQ | Draws a line between successive points in an array. |
RECTANGLE | Draws a rectangle using viewport coordinates. |
RECTANGLE_W | Draws a rectangle using window coordinates. |
Routines to Display Character-Based Text | |
DISPLAYCURSOR | Sets the cursor on or off. |
GETTEXTPOSITION | Returns the current text-output position. |
GETTEXTWINDOW | Returns the boundaries of the current text window. |
OUTTEXT | Sends text to the screen at the current position. |
SCROLLTEXTWINDOW | Scrolls the contents of a text window. |
SETTEXTCURSOR | Sets the height and width of the text cursor for the window in focus. |
SETTEXTPOSITION | Sets the current text-output position. |
SETTEXTWINDOW | Sets the boundaries of the current text window. |
WRAPON | Turns line wrapping on or off. |
Routines to Display Font-Based Characters | |
GETFONTINFO | Returns the current font characteristics. |
GETGTEXTEXTENT | Returns the width of specified text in the current font. |
GETGTEXTROTATION | Returns the current orientation of the font text output by OUTGTEXT. |
INITIALIZEFONTS | Initializes the font library. |
OUTGTEXT | Sends text in the current font to the screen at the current position. 2 |
SETFONT | Finds one font that matches a specified set of characteristics and makes it the current font used by OUTGTEXT. |
SETGTEXTROTATION | Sets the orientation angle of font text output in degrees. |
Routines to Transfer Images in Memory | |
GETIMAGE | Stores a screen image using viewport coordinates. |
GETIMAGE_W | Stores a screen image using window coordinates. |
IMAGESIZE | Returns a viewport-coordinate image size in bytes. |
IMAGESIZE_W | Returns a window-coordinate image size in bytes. |
PUTIMAGE | Retrieves a viewport-coordinate image from memory and displays it. |
PUTIMAGE_W | Retrieves a window-coordinate image from memory and displays it. |
Routines to Load and Save Images to Files | |
LOADIMAGE | Reads a Windows bitmap file (.BMP) from disk and displays it as specified viewport coordinates. |
LOADIMAGE_W | Reads a Windows bitmap file (.BMP) from disk and displays it as specified window coordinates. |
SAVEIMAGE | Saves an image from a specified part of the screen and saves it as a Windows bitmap file; screen location is specified using viewport coordinates. |
SAVEIMAGE_W | Saves an image from a specified part of the screen and saves it as a Windows bitmap file; screen location is specified using window coordinates. |
1 RGB is Red-Green-Blue
2 OUTGTEXT allows use of special fonts; OUTTEXT does not |
For more information on these routines, see the Compaq Visual Fortran online Reference.