OUTGTEXT

Graphics Subroutine: In graphics mode, sends a string of text to the screen, including any trailing blanks.

Module: USE DFLIB

Syntax

CALL OUTGTEXT (text)

text
(Input) Character*(*). String to be displayed.

Text output begins at the current graphics position, using the current font set with SETFONT and the current color set with SETCOLORRGB or SETCOLOR. No formatting is provided. After it outputs the text, OUTGTEXT updates the current graphics position.

Before you call OUTGTEXT, you must call INITIALIZEFONTS.

Because OUTGTEXT is a graphics function, the color of text is affected by the SETCOLORRGB function, not by SETTEXTCOLORRGB.

Compatibility

STANDARD GRAPHICS QUICKWIN GRAPHICS LIB

See Also: GETFONTINFO, GETGTEXTEXTENT, INITIALIZEFONTS, MOVETO, SETCOLORRGB, SETFONT, SETGTEXTROTATION

Example

 ! build as a QuickWin App.
 USE DFLIB
 INTEGER(2) result
 INTEGER(4) i
 TYPE (xycoord) xys

 result = INITIALIZEFONTS()
 result = SETFONT('t''Arial''h18w10pvib')
 do i=1,6
    CALL MOVETO(INT2(0),INT2(30*(i-1)),xys)
    grstat=SETCOLOR(INT2(i))
    CALL OUTGTEXT('This should be ')
    SELECT CASE (i)
      CASE (1)
        CALL OUTGTEXT('Blue')
      CASE (2)
        CALL OUTGTEXT('Green')
      CASE (3)
        CALL OUTGTEXT('Cyan')
      CASE (4)
        CALL OUTGTEXT('Red')
      CASE (5)
        CALL OUTGTEXT('Magenta')
      CASE (6)
        CALL OUTGTEXT('Orange')
    END SELECT
 END DO
 END