Borland C++ reference

outtext

raw OCR

Displays a string in the viewport.

Defined in header <graphics.h>

Syntax

#include <graphics.h>
void far outtext(char far *textstring);

Portability

DOSUNIXWindowsANSI CC++ only
■

Remarks

outtext displays a text string in the viewport, using the current . justification settings and the current font, direction, and size.

outtext outputs textstring at the current position (CP). If the horizontal text

justification is LEFT_TEXTand the text direction is HORIZ_DIR,the CP's

x-coordinate is advanced by textmdVnitextstring). Otherwise, the CP remains unchanged.

To maintain code compatibility when using several fonts, use textwidth and textheight to determine the dimensions of the string.

If a string is printed with the default font using outtext, any part of the string that extends outside the current viewport is truncated.

outtext is for use in graphics mode; it will not work in text mode.

Return value

None.

See also

  • gettextsettings
  • outtextxy
  • settextjustify
  • textheight
  • textwidth
  • tinclude
  • <graphics.h>
  • linclude
  • <stdlib.h>
  • ttinclude
  • <stdio.h>
  • #include
  • <conio.h>
  • int
  • main
  • ;
  • /*
  • read
  • result
  • of
  • initialization
  • */
  • errorcode
  • =
  • graphresult
  • ;
  • if
  • {
  • /*
  • an
  • error
  • occurred
  • */
  • printf);
  • printf;
  • getchO
  • ;
  • exitd)/*
  • terminate
  • with
  • an
  • error
  • code
  • */
  • midx
  • =
  • getmaxx
  • /
  • 2
  • ;
  • midy
  • =
  • getmaxyO
  • /
  • 2;
  • /*
  • move
  • the
  • CP
  • to
  • the
  • center
  • of
  • the
  • screen
  • */
  • moveto;
  • /*
  • output
  • text
  • starting
  • at
  • the
  • CP
  • */
  • outtext;
  • outtext;
  • outtext;
  • outtext;
  • /*
  • clean
  • up
  • */
  • getchO;
  • closegraphO
  • ;
  • return
  • 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.