outtext
Displays a string in the viewport.
Defined in header <graphics.h>
Syntax
#include <graphics.h>
void far outtext(char far *textstring);
Portability
| DOS | UNIX | Windows | ANSI C | C++ 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_TEXT | and 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
gettextsettingsouttextxysettextjustifytextheighttextwidthtinclude<graphics.h>linclude<stdlib.h>ttinclude<stdio.h>#include<conio.h>intmain;/*readresultofinitialization*/errorcode=graphresult;if{/*anerroroccurred*/printf);printf;getchO;exitd)/*terminatewithanerrorcode*/midx=getmaxx/2;midy=getmaxyO/2;/*movetheCPtothecenterofthescreen*/moveto;/*outputtextstartingattheCP*/outtext;outtext;outtext;outtext;/*cleanup*/getchO;closegraphO;return0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Stable link: /3.1/graphics.h/outtext/
· short form /3.1/outtext/