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>
    short _FAR _arc( short x1, short y1,
                     short x2, short y2,
                     short x3, short y3,
                     short x4, short y4 );

    short _FAR _arc_w( double x1, double y1,
                       double x2, double y2,
                       double x3, double y3,
                       double x4, double y4 );

    short _FAR _arc_wxy( struct _wxycoord _FAR *p1,
                         struct _wxycoord _FAR *p2,
                         struct _wxycoord _FAR *p3,
                         struct _wxycoord _FAR *p4 );

Description:
    The _arc functions draw elliptical arcs.  The _arc function uses the
    view coordinate system.  The _arc_w and _arc_wxy functions use the
    window coordinate system.

    The center of the arc is the center of the rectangle established by the
    points (x1,y1) and (x2,y2).  The arc is a segment of the ellipse drawn
    within this bounding rectangle.  The arc starts at the point on this
    ellipse that intersects the vector from the centre of the ellipse to the
    point (x3,y3).  The arc ends at the point on this ellipse that
    intersects the vector from the centre of the ellipse to the point
    (x4,y4).  The arc is drawn in a counter-clockwise direction with the
    current plot action using the current color and the current line style.

    The following picture illustrates the way in which the bounding
    rectangle and the vectors specifying the start and end points are
    defined.

    The graphical image cannot be reproduced here.  See the printed version
    of the manual.
    When the coordinates (x1,y1) and (x2,y2) establish a line or a point
    (this happens when one or more of the x-coordinates or y-coordinates are
    equal), nothing is drawn.

    The current output position for graphics output is set to be the point
    at the end of the arc that was drawn.

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

See Also:
    _ellipse, _ellipse_w, _ellipse_wxy, _pie, _pie_w, _pie_wxy, _rectangle, _rectangle_w, _rectangle_wxy, _getarcinfo, _setcolor, _setlinestyle,
    _setplotaction

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

    main()
    {
        _setvideomode( _VRES16COLOR );
        _arc( 120, 90, 520, 390, 500, 20, 450, 460 );
        getch();
        _setvideomode( _DEFAULTMODE );
    }

    produces the following:

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

Classification:
    PC Graphics

Systems:
     _arc - DOS, QNX

    _arc_w - DOS, QNX
    _arc_wxy - DOS, QNX

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