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/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <graph.h>
    void _FAR _gettextextent( short x, short y,
                              char _FAR *text,
                              struct xycoord _FAR *concat,
                              struct xycoord _FAR *extent );

Description:
    The _gettextextent function simulates the effect of using the  _grtext
    function to display the text string text at the position (x,y), using
    the current text settings.  The concatenation point is returned in the
    argument concat.  The text extent parallelogram is returned in the array
    extent.

    The concatenation point is the position to use to output text after the
    given string.  The text extent parallelogram outlines the area where the
    text string would be displayed.  The four points are returned in
    counter-clockwise order, starting at the upper-left corner.

Returns:
    The _gettextextent function does not return a value.

See Also:
    _grtext, _grtext_w, _gettextsettings

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

    main()
    {
        struct xycoord concat;
        struct xycoord extent[ 4 ];

        _setvideomode( _VRES16COLOR );
        _grtext( 100, 100, "hot" );
        _gettextextent( 100, 100, "hot", Concatenation Functions, &extent );
        _polygon( _GBORDER, 4, &extent );
        _grtext( concat.xcoord, concat.ycoord, "dog" );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

    produces the following:

    The graphical image cannot be reproduced here. See the printed
    version of the manual.

Classification:
    PC Graphics

Systems:
    DOS, QNX

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