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>
    short _FAR _polygon( short fill, short numpts,
                         struct xycoord _FAR *points );

    short _FAR _polygon_w( short fill, short numpts,
                           double _FAR *points );

    short _FAR _polygon_wxy( short fill, short numpts,
                             struct _wxycoord _FAR *points );

Description:
    The _polygon functions draw polygons.  The _polygon function uses the
    view coordinate system.  The _polygon_w and _polygon_wxy functions use
    the window coordinate system.

    The polygon is defined as containing numpts points whose coordinates are
    given in the array points.

    The argument fill determines whether the polygon is filled in or has
    only its outline drawn.  The argument can have one of two values:

    _GFILLINTERIOR
        fill the interior by writing pixels with the current plot action
        using the current color and the current fill mask

    _GBORDER
        leave the interior unchanged; draw the outline of the figure with
        the current plot action using the current color and line style


Returns:
    The _polygon functions return a non-zero value when the polygon was
    successfully drawn; otherwise, zero is returned.

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

    struct xycoord points[ 5 ] = {
        319, 140, 224, 209, 261, 320,
        378, 320, 415, 209
    };

    main()
    {
        _setvideomode( _VRES16COLOR );
        _polygon( _GBORDER, 5, points );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

    produces the following:



Classification:
    PC Graphics

Systems:
     _polygon - DOS, QNX

    _polygon_w - DOS, QNX
    _polygon_wxy - DOS, QNX

See Also:
    _setcolor, _setfillmask, _setlinestyle, _setplotaction

See Also: _setcolor _setfillmask

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