'_imagesize_wxy func'에 해당되는 글 1건

  1. 2021.07.02 Watcom C Library : _imagesize, _imagesize_w, _imagesize_wxy, inp, inpd, inpw

 

 

Watcom C Library Reference : _imagesize, _imagesize_w, _imagesize_wxy, inp, inpd, inpw

 

 

 

 

_imagesize, _imagesize_w, _imagesize_wxy

 

Synopsis : #include <graph.h> 

              long _FAR _imagesize( short x1, short y1, short x2, short y2 );
              long _FAR _imagesize_w( double x1, double y1, double x2, double y2 );
              long _FAR _imagesize_wxy( struct _wxycoord _FAR *p1, struct _wxycoord _FAR *p2 );


Description : The _imagesize functions compute the number of bytes required to store a screen image.

The _imagesize function uses the view coordinate system. The _imagesize_w and _imagesize_wxy functions use the window coordinate system.


The screen image is the rectangular area defined by the points (x1, y1) and (x2, y2). The storage area used by the _getimage functions must be at least this large (in bytes).

 

 

Returns : The _imagesize functions return the size of a screen image.

 

 

See Also : _getimage, _putimage

 


Example :

#include <conio.h> 

#include <graph.h> 

#include <malloc.h>


void main( )

{
    char   *buf;

    int     y;


    _setvideomode( _VRES16COLOR );

    _ellipse( _GFILLINTERIOR, 100, 100, 200, 200 );

    buf = malloc( _imagesize( 100, 100, 201, 201 ) );

 

    if( buf != NULL) {
        _getimage( 100, 100, 201, 201, buf );

        _putimage( 260, 200, buf, _GPSET );

        _putimage( 420, 100, buf, _GPSET );

        for( y = 100; y < 300; ) {
            _putimage( 420, y, buf, _GXOR );

            y += 20;

            _putimage( 420, y, buf, _GXOR );

        }
        free ( buf );

    }


    getch( );

    _setvideomode( _DEFAULTMODE );

}

 

Classification : PC Graphics
Systems : _imagesize - DOS, QNX 

             _imagesize_w - DOS, QNX 

             _imagesize_wxy - DOS, QNX

 

 

 

 

 

inp

 

Synopsis : #include <conio.h> 

              unsigned int inp( int port );

 


Description : The inp function reads one byte from the 80x86 hardware port whose number is given by
port.

 

A hardware port is used to communicate with a device. One or two bytes can be read and/or written from each port, depending upon the hardware. Consult the technical documentation for your computer to determine the port numbers for a device and the expected usage of each port for a device.

 

 

Returns : The value returned is the byte that was read.

 

 

See Also : inpd, inpw, outp, outpd, outpw

 


Example :

#include <conio.h>


void main( )

{
    /* turn off speaker */

    outp (0x61, inp( 0x61 ) & 0xFC );

}

 

Classification : Intel
Systems : All

 

 

 

 

 

inpd

 

Synopsis : #include <conio.h> 

              unsigned long inpd( int port );

 


Description : The inpd function reads a double-word (four bytes) from the 80x86 hardware port whose number is given by port.


A hardware port is used to communicate with a device. One or two bytes can be read and/or written from each port, depending upon the hardware. Consult the technical documentation for your computer to determine the port numbers for a device and the expected usage of each port for a device.

 

 

Returns : The value returned is the double-word that was read.

 

 

See Also : inp, inpw, outp, outpd, outpw

 


Example :

#include <conio.h> 

#define DEVICE 34


void main( )

{
    unsigned long transmitted;


    transmitted = inpd( DEVICE );

}

 

Classification : Intel
Systems : DOS/32, Win/32, QNX/32, OS/2 2.x, NT

 

 

 

 

 

inpw

 

Synopsis : #include <conio.h> 

              unsigned int inpw( int port );

 


Description :  The inpw function reads a word (two bytes) from the 80x86 hardware port whose number is given by port.


A hardware port is used to communicate with a device. One or two bytes can be read and/or written from each port, depending upon the hardware. Consult the technical documentation for your computer to determine the port numbers for a device and the expected usage of each port for a device.

 

 

Returns : The value returned is the word that was read.

 

 

See Also : inp, inpd, outp, outpd, outpw

 


Example :

#include <conio.h> 

#define DEVICE 34


void main( )

{
    unsigned int transmitted;


    transmitted = inpw( DEVICE );

}

 

Classification : Intel
Systems : 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 전화카드
,