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 _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.

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:



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