Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

OUTGTEXT

Graphics Subroutine: In graphics mode, sends a string of text to the screen, including any trailing blanks. This routine is only available for Windows.

Module

USE IFQWIN

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 the INITIALIZEFONTS function.

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

Example

 ! build as a QuickWin App.
 USE IFQWIN
 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