'_arc_wxy'에 해당되는 글 1건

  1. 2021.06.13 Watcom C Library Reference : _arc, _arc_w, _arc_wxy, asctime Functions

 

 

WATCOM C Library Reference : _arc, _arc_w, _arc_wxy,  asctime Functions

 

 

 

 

_arc, _arc_w, _arc_wxy

 

Synopsis : #include <graph.h> 

short _FAR _arc( short x1, short y1,

                     short x2, short y2,

                     short x3, short y3,

                     short x4, short y 4 );


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 elipse 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,74). The arc is drawn in a counter-lockwise 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.

 


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, _pie, _rectangle, _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 :

 

Classification : PC Graphics

Systems :

_arc  - DOS, QNX

_arc_w  - DOS, QNX

_arc_wxy  - DOS, QNX

 

 

 

asctime Functions

 

Synopsis : #include <time.h> char * asctime( const struct tm *timeptr);

              char *_asctime ( const struct tm *timeptr, char *buf );

              struct tm {
                  int tm_sec;     /* seconds after the minute -- [0,61]  */

                  int tm_min;     /* minutes after the hour    -- [0,59]  */

                  int tm_hour;    /* hours after midnight      -- [0,23]  */ 

                  int tm_mday;   /* day of the month          -- [1,31]  */

                  int tm_mon;    /* months since January      -- [0,11]  */

                  int tm_year;    /* years since 1900                        */

                  int tm_wday;   /* days since Sunday          -- [0,6]   */ 

                  int tm_yday;   /* days since January 1       -- [0,365] */
                  int tm_isdst;   /* Daylight Savings Time flag            */

};



Description : The asctime functions convert the time information in the structure pointed to by timeptr
into a string containing exactly 26 characters. This string has the form shown in the following example:

 

    Sat Mar 21 15:58:27 1987\n\0


All fields have a constant width. The new-line character '\n' and the null character '10' occupy the last two positions of the string.


The ANSI function asctime places the result string in a static buffer that is re-used each time asctime or ctime is called. The non-ANSI function asctime places the result string in the buffer pointed to by buf. 

 

Returns : The asctime functions return a pointer to the character string result.

See Also : clock, ctime, difftime, gmtime, localtime, mktime, strftime, time. tzset

 


Example :
#include <stdio.h> 

#include <time.h>

 

void main( )


    struct tm time_of_day;

    time_t ltime;

    auto char buf[26];
    time ( &ltime );

    _localtime ( &ltime, &time_of_day );

    printf( "Date and time is: %s\n", Lasctime ( &time_of_day, buf ) );

}

 

 

produces the following :

Date and time is: Sat Mar 21 15:58:27 1987

 


Classification : ANSI, _asctim is not ANSI
       

 

Systems :

asctime - All
_asctime - All

 

 

 

 

 

 

This manual describes the WATCOM C library for DOS, Windows, and OS/2, It includes the Standard C Library (as defined in the ANSI C Standard).

 

WATCOM C Language Reference manual describes the ANSI C Programming language and extensions to it which are supported by WATCOM C/C++ (32bit)

 

 

 

728x90
반응형
Posted by 전화카드
,