C / graphics.h / settextjustify
arc, bar, bar3d, circle, cleardevice, clearviewport, closegraph, detectgraph, drawpoly, ellipse, fillellipse, fillpoly, floodfill, getarccoords, getaspectratio, getbkcolor, getcolor, getdefaultpalette, getdrivername, getfillpattern, getfillsettings, getgraphmode, getimage, getlinesettings, getmaxcolor, getmaxmode, getmaxx, getmaxy, getmodename, getmoderange, getpalette, getpalettesize, getpixel, gettextsettings, getviewsettings, getx, gety, graphdefaults, grapherrormsg, _graphfreemem, _graphgetmem, graphresult, imagesize, initgraph, installuserdriver, installuserfont, line, linerel, lineto, moverel, moveto, outtext, outtextxy, pieslice, putimage, putpixel, rectangle, registerbgidriver, registerbgifont, restorecrtmode, sector, setactivepage, setallpalette, setaspectratio, setbkcolor, setfillpattern, setfillstyle, setgraphbufsize, setgraphmode, setlinestyle, setpalette, setrgbpalette, » settextjustify, settextstyle, setusercharsize, setviewport, setvisualpage, setwritemode, textheight, textwidth,
Funcion: settextjustify()
Sintaxis:
void far settextjustify(int horizontal, int vertical);

Descripcion: Esta función es usada para especificar el método en el cual el texto es colocado en la pantalla con relación a la posición del cursor. El argumento horizontal define la justificación horizontal, mientras que el argumento vertical indica la justificación vertical.

Existen varios valores y constantes para las justificaciones.

Ejemplo:
#include <graphics.h>
#include <conio.h>
 
int main() {
   int gdriver = EGA;
   int gmodo = EGAHI;
 
/* Si has registrado los dispositivos para que formen parte de graphics.lib
** entonces usa estas sentencias:
 
   registerbgidriver( EGAVGA_driver );
   initgraph( &gdriver, &gmodo, "" );
*/
 
/* Si no, entonces has de "decir" d&oacute;nde se encuentra el dispositivo gr&aacute;fico */
 
   initgraph( &gdriver, &gmodo, "C:\\BC5\\BGI" );
 
   settextjustify( RIGHT_TEXT, BOTTOM_TEXT );
   moveto(300, 200);
   outtext( "(RIGHT_TEXT, BOTTOM_TEXT)" );
 
   settextjustify( RIGHT_TEXT, TOP_TEXT );
   moveto(300, 200);
   outtext( "(RIGHT_TEXT, TOP_TEXT)" );
 
   settextjustify( LEFT_TEXT, BOTTOM_TEXT );
   moveto(300, 200);
   outtext( "(LEFT_TEXT, BOTTOM_TEXT)" );
 
   settextjustify( LEFT_TEXT, TOP_TEXT );
   moveto(300, 200);
   outtext( "(LEFT_TEXT, TOP_TEXT)" );
 
   setcolor( 1 );
   line( 300, 200, 300, 100 );
 
   setcolor( 2 );
   line( 300, 200, 300, 300 );
 
   setcolor( 3 );
   line( 300, 200, 100, 200 );
 
   setcolor( 4 );
   line( 300, 200, 500, 200 );
 
   getch();
   closegraph();
 
   return 0;
}

Librerias C

Librerias ANSI C
   string.hcstring
   math.hcmath
   stdio.hcstdio
   time.hctime
   stdlib.hcstdlib
   ctype.hcctype
   locale.hclocale
   signal.hcsignal
   setjmp.hcsetjmp

Librerias Borland
   conio.h
   graphics.h