Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    void _FAR _settextalign( short horiz, short vert );

Description:
    The _settextalign function sets the current text alignment to the values
    specified by the arguments horiz and vert.  When text is displayed with
    the  _grtext function, it is aligned (justified) horizontally and
    vertically about the given point according to the current text alignment
    settings.

    The horizontal component of the alignment can have one of the following
    values:

    _NORMAL
        use the default horizontal alignment for the current setting of the
        text path

    _LEFT
        the text string is left justified at the given point

    _CENTER
        the text string is centred horizontally about the given point

    _RIGHT
        the text string is right justified at the given point

    The vertical component of the alignment can have one of the following
    values:

    _NORMAL
        use the default vertical alignment for the current setting of the
        text path

    _TOP
        the top of the text string is aligned at the given point

    _CAP
        the cap line of the text string is aligned at the given point

    _HALF
        the text string is centred vertically about the given point

    _BASE
        the base line of the text string is aligned at the given point

    _BOTTOM
        the bottom of the text string is aligned at the given point

    The default is to use _LEFT alignment for the horizontal component
    unless the text path is _PATH_LEFT, in which case _RIGHT alignment is
    used.  The default value for the vertical component is _TOP unless the
    text path is _PATH_UP, in which case _BOTTOM alignment is used.

Returns:
    The _settextalign function does not return a value.

Example:
    #include <conio.h>
    #include <graph.h>

    main()
    {
        _setvideomode( _VRES16COLOR );
        _grtext( 200, 100, "WATCOM" );
        _setpixel( 200, 100 );
        _settextalign( _CENTER, _HALF );
        _grtext( 200, 200, "Graphics" );
        _setpixel( 200, 200 );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

    produces the following:



Classification:
    PC Graphics

Systems:
    DOS, QNX

See Also:
    _grtext, _gettextsettings

See Also: _gettextsettings

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson