home *** CD-ROM | disk | FTP | other *** search
- /*
- *****************************************************************************
- *****************************************************************************
- *** ***
- *** PGL.H - PGL 'C' Language Include File ***
- *** Turbo C/C++, Microsoft C / Quick C, WATCOM C ***
- *** ***
- *** Copyright (C) 1991 AnSOFT, Inc. - All Rights Reservd. ***
- *** ***
- *****************************************************************************
- *****************************************************************************
- */
- #ifndef PGL_DEF
- #define PGL_DEF
-
- /*
- * Page Orientation
- */
- #define pgPORTRAIT 0
- #define pgLANDSCAPE 1
-
- /*
- * Page Size
- */
- #define pgHALFPAGE 0
- #define pgFULLPAGE 1
- #define pgSMALLPAGE 2
-
- /*
- * Device Type
- */
- #define pgDOTMATRIX 0
- #define pgLASERJET 1
- #define pgPCX 2
- #define pgEPS 3
-
- /*
- * Printer ON/OFF definition
- */
- #define pgOFF 0
- #define pgON 1
-
- /*
- * Line style definition
- */
- #define pgLSOLID 0
- #define pgLHUGEDASH 1
- #define pgLBIGDASH 2
- #define pgLMEDDASH 3
- #define pgLSMALLDASH 4
- #define pgLWIDEDOT 5
- #define pgLCLOSEDOT 6
- #define pgLDASHDOT 7
- #define pgLCENTER 8
-
- /*
- * Fill Style Definition
- */
- #define pgFEMPTY 0
- #define pgFSOLID 1
- #define pgFLINE 2
- #define pgFLTSLASH 3
- #define pgFSLASH 4
- #define pgFBKSLASH 5
- #define pgFLTBKSLASH 6
- #define pgFHATCH 7
- #define pgFXHATCH 8
- #define pgFINTERLEAVE 9
- #define pgFWIDEDOT 10
- #define pgFCLOSEDOT 11
-
- /*
- * Fill Flag Constants
- */
- #define pgOUTLINE 1
- #define pgFILL 2
- #define pgOFILL 3
-
- /*
- * Fill Mechanism - Opaque & Transparent
- */
- #define pgTRANS 0
- #define pgOPAQ 1
-
- #ifndef PGLTEXT_JUST
- enum pgltext_just
- {
- pgLEFT = 0,
- pgCENTER = 1,
- pgRIGHT = 2,
- pgBOTTOM = 0,
- pgTOP = 2
- };
- #define PGLTEXT_JUST
- #endif
-
- /*
- * Font Style Definition
- */
- #ifndef PGLFONT_NAMES
- #define PGLFONT_NAMES
- enum font_text
- {
- pgSMALL = 0,
- pgSIMPLEX = 1,
- pgDUPLEX = 2,
- pgTRIPLEX = 3,
- pgGOTHIC = 4,
- pgSCRIPT = 5,
- pgSDUPLEX = 6
- };
- #endif
-
- /*
- *****************************************************************************
- *** PGL 16 Bit C Interface ***
- *****************************************************************************
- */
- #ifndef __386__
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if defined(__WATCOMC__)
- #include <stddef.h>
- #ifndef LANG
- #define LANG far cdecl
- #endif
- #else
- #ifndef LANG
- #define LANG far
- #endif
- #endif
-
- /*
- *****************************************************************************
- *** PGL Device Info Commands ***
- *****************************************************************************
- */
- int LANG pgGetDevColors ( int res );
- int LANG pgGetDevHeight ( void );
- int LANG pgGetDevMaxX ( int res );
- int LANG pgGetDevMaxY ( int res );
- int LANG pgGetDevModes ( void );
- int LANG pgGetDevOffsetX ( void );
- int LANG pgGetDevOffsetY ( void );
- int LANG pgGetDevPlanes ( int res );
- int LANG pgGetDevResX ( int res );
- int LANG pgGetDevResY ( int res );
- int LANG pgGetDevType ( void );
- int LANG pgGetDevWidth ( void );
-
- short LANG pgLoadDevInfo ( char far * name );
-
- void LANG pgSetPageMargins ( int left, int top, int right, int bot );
- void LANG pgSetPageForm ( int form );
- void LANG pgSetPageSize ( int size );
-
- /*
- *****************************************************************************
- *** PGL System Commands ***
- *****************************************************************************
- */
- void LANG pgClearDrw ( int far * err );
- void LANG pgEndDrw ( void );
- int LANG pgGetStatus ( void );
- void LANG pgInitDrw ( char far * file, int width, int height,
- int far * err );
- void LANG pgNewPage ( void );
- void LANG pgOpenDrw ( char far * file , int far * err);
-
- /*
- *****************************************************************************
- *** PGL BitMap Commands ***
- *****************************************************************************
- */
- void LANG pgBMInit ( int x, int y,
- int width, int height, int bpp, int rle );
- void LANG pgBMData ( int row, int far * data );
- void LANG pgBMEnd ( void );
-
- /*
- *****************************************************************************
- *** PGL Drawing Commands ***
- *****************************************************************************
- */
- void LANG pgArc ( int x, int y, int rad, int sa, int ea );
- void LANG pgCircle ( int x, int y, int rad, int fillflag );
- void LANG pgClearViewPort ( void );
- void LANG pgEllArc ( int x, int y, int radx, int rady,
- int sa, int ea );
- void LANG pgEllipse ( int x, int y, int radx, int rady,
- int fillflag );
-
- void LANG pgLine ( int x1, int y1, int x2, int y2 );
- void LANG pgLineRel ( int x, int y );
- void LANG pgLineTo ( int x, int y );
- void LANG pgMoveTo ( int x, int y );
- void LANG pgMoveRel ( int x, int y );
- void LANG pgPie ( int x, int y, int rad, int sa, int ea,
- int fillflag );
- void LANG pgPolyLine ( int far * polydata, int npoints );
- void LANG pgPolygon ( int far * polydata, int npoints, int fillflag );
- void LANG pgRectangle ( int x1, int y1, int x2, int y2, int fillflag );
- void LANG pgSector ( int x, int y, int radx, int rady, int sa, int ea,
- int fillflag );
- void LANG pgSetPixel ( int x, int y, int color);
-
- /*
- *****************************************************************************
- *** Commands To Set The Graphics System & Parameters ***
- *****************************************************************************
- */
- void LANG pgSetColor ( int color );
- void LANG pgSetPalette ( int index, int color );
- void LANG pgSetRgbPalette ( int index, int red, int green, int blue );
- void LANG pgSetDefaults ( void );
- void LANG pgSetFillMode ( int mode );
- void LANG pgSetFillStyle ( int style, int color );
- void LANG pgSetFillPattern ( char far *style, int color );
- void LANG pgSetLineStyle ( int style, int thick );
- void LANG pgSetLineWeight ( int weight );
- void LANG pgSetLinePattern ( int pat, int thick );
- void LANG pgSetClipArea ( int cx1, int cy1, int cx2, int cy2 );
- void LANG pgSetClipping ( int flag );
- void LANG pgSetPrn ( int flag );
- void LANG pgSetViewPort ( int x1, int y1, int x2, int y2 );
-
- /*
- *****************************************************************************
- *** PGL Graphics Text Functions ***
- *****************************************************************************
- */
- void LANG pgDrawText ( char far * str );
- void LANG pgDrawTextXY ( int x, int y, char far * str );
- int LANG pgGetCharSpacing ( void );
- int LANG pgGetTextBolding ( void );
- int LANG pgGetTextHeight ( void );
- void LANG pgGetTextJustify ( int far *horiz, int far *vert );
- int LANG pgGetTextLength ( char far *str );
- void LANG pgGetTextOrient ( int far *ox, int far *oy );
- void LANG pgGetTextScaling ( int far *multx, int far *divx,
- int far *multy, int far *divy );
- int LANG pgGetTextStyle ( void );
-
- void LANG pgSetCharSpacing ( int space );
- void LANG pgSetTextBolding ( int thick );
- void LANG pgSetTextJustify ( int horiz, int vert );
- void LANG pgSetTextOrient ( int ox, int oy );
- void LANG pgSetTextScaling ( int multx, int divx, int multy, int divy );
- void LANG pgSetTextStyle ( int fontno );
-
- /*
- *****************************************************************************
- *** Commands To Get The Graphics System Parameters ***
- *****************************************************************************
- */
- int LANG pgGetAbsX ( void );
- int LANG pgGetAbsY ( void );
- void LANG pgGetClipArea ( int far *cx1, int far *cy1,
- int far *cx2, int far *cy2 );
- int LANG pgGetClipping ( void );
- int LANG pgGetColor ( void );
- int LANG pgGetFillMode ( void );
- void LANG pgGetFillPattern ( char far *style, int far *color );
- void LANG pgGetFillStyle ( int far *style, int far *color );
- void LANG pgGetLinePattern ( int far *pat, int far *thick );
- void LANG pgGetLineStyle ( int far *style, int far *thick );
- int LANG pgGetLineWeight ( void );
- int LANG pgGetMaxX ( void );
- int LANG pgGetMaxY ( void );
- int LANG pgGetPrn ( void );
- void LANG pgGetViewPort ( int far *x1, int far *y1,
- int far *x2, int far *y2 );
- int LANG pgGetX ( void );
- int LANG pgGetY ( void );
-
- #ifdef __cplusplus
- }
- #endif
- #else
- /*
- *****************************************************************************
- *** PGL 32 Bit C Interface ***
- *****************************************************************************
- */
- /*
- #ifdef __cplusplus
- extern "C" {
- #endif
- */
- #include <stddef.h>
- #define LANG
-
- int LANG pgLoadDevInfo ( char * name );
-
- void LANG pgSetPageMargins ( int left, int top, int right, int bot );
- void LANG pgSetPageForm ( int form );
- void LANG pgSetPageSize ( int size );
-
- int LANG pgGetDevModes ( void );
- int LANG pgGetDevType ( void );
- int LANG pgGetDevHeight ( void );
- int LANG pgGetDevWidth ( void );
- int LANG pgGetDevOffsetX ( void );
- int LANG pgGetDevOffsetY ( void );
-
- int LANG pgGetDevColors ( int res );
- int LANG pgGetDevMaxX ( int res );
- int LANG pgGetDevMaxY ( int res );
- int LANG pgGetDevResX ( int res );
- int LANG pgGetDevResY ( int res );
- int LANG pgGetDevPlanes ( int res );
-
- /****************************************************************************
- * PGL Bitmap functions
- *****************************************************************************
- */
- void LANG pgBMInit ( int x, int y, int width, int height, int bpp, int rle );
- void LANG pgBMData ( int row, int * data );
- void LANG pgBMEnd ( void );
-
- /****************************************************************************
- * PGL System functions
- *****************************************************************************
- */
- void LANG pgInitDrw ( char *file, int width, int height, int * err );
- void LANG pgOpenDrw ( char *file , int * err);
- void LANG pgClearDrw ( int * err );
- void LANG pgEndDrw ( void );
- void LANG pgNewPage ( void );
- int LANG pgGetStatus ( void );
-
- /****************************************************************************
- * PGL Drawing Commands
- *****************************************************************************
- */
- void LANG pgMoveTo ( int x, int y );
- void LANG pgMoveRel ( int x, int y );
- void LANG pgLineTo ( int x, int y );
- void LANG pgLineRel ( int x, int y );
- void LANG pgLine ( int x1, int y1, int x2, int y2 );
- void LANG pgSetPixel ( int x, int y, int color);
- void LANG pgArc ( int x, int y, int rad, int sa, int ea );
- void LANG pgEllArc ( int x, int y, int radx, int rady, int sa, int ea );
- void LANG pgPie ( int x, int y, int rad, int sa, int ea, int fillflag );
- void LANG pgSector ( int x, int y, int radx, int rady, int sa, int ea, int fillflag );
- void LANG pgRectangle ( int x1, int y1, int x2, int y2, int fillflag );
- void LANG pgCircle ( int x, int y, int rad, int fillflag );
- void LANG pgEllipse ( int x, int y, int radx, int rady, int fillflag );
- void LANG pgPolygon ( int *polydata, int numpoints, int fillflag );
- void LANG pgPolyLine ( int *polydata, int numpoints );
- void LANG pgDrawText ( char *str );
- void LANG pgDrawTextXY ( int x, int y, char *str );
- void LANG pgClearViewPort ( void );
- void LANG pgBMInit ( int x, int y, int width, int height, int bpp, int rle);
- void LANG pgBMData ( int row, int * data );
- void LANG pgBMEnd ( void );
-
-
- /****************************************************************************
- * Commands To Set The Graphics System & Parameters
- *****************************************************************************
- */
- void LANG pgSetColor ( int color );
- void LANG pgSetPalette ( int index, int color );
- void LANG pgSetRgbPalette ( int index, int red, int green, int blue );
- void LANG pgSetDefaults ( void );
- void LANG pgSetFillMode ( int mode );
- void LANG pgSetFillStyle ( int style, int color );
- void LANG pgSetFillPattern ( char *style, int color );
- void LANG pgSetLineStyle ( int style, int thick );
- void LANG pgSetLineWeight ( int weight );
- void LANG pgSetLinePattern ( int pat, int thick );
- void LANG pgSetTextBolding ( int thick );
- void LANG pgSetCharSpacing ( int space );
- void LANG pgSetTextScaling ( int multx, int divx, int multy, int divy );
- void LANG pgSetTextSize ( int size );
- void LANG pgSetTextJustify ( int horiz, int vert );
- void LANG pgSetTextItalics ( int ital );
- void LANG pgSetTextOrient ( int ox, int oy );
- void LANG pgSetTextStyle ( int fontno );
- void LANG pgSetClipArea ( int cx1, int cy1, int cx2, int cy2 );
- void LANG pgSetClipping ( int flag );
- void LANG pgSetPrn ( int flag );
- void LANG pgSetViewPort ( int x1, int y1, int x2, int y2 );
-
- /****************************************************************************
- * Commands To Get The Graphics System Parameters
- *****************************************************************************
- */
- int LANG pgGetColor ( void );
- int LANG pgGetFillMode ( void );
- void LANG pgGetFillStyle ( int *style, int *color );
- void LANG pgGetFillPattern ( char *style, int *color );
- void LANG pgGetLineStyle ( int *style, int *thick );
- int LANG pgGetLineWeight ( void );
- void LANG pgGetLinePattern ( int *pat, int *thick );
- int LANG pgGetMaxX ( void );
- int LANG pgGetMaxY ( void );
- int LANG pgGetTextBolding ( void );
- int LANG pgGetCharSpacing ( void );
- void LANG pgGetTextScaling ( int *multx, int *divx, int *multy, int *divy );
- void LANG pgGetTextJustify ( int *horiz, int *vert );
- int LANG pgGetTextItalics ( void );
- void LANG pgGetTextOrient ( int *ox, int *oy );
- int LANG pgGetTextStyle ( void );
- void LANG pgGetClipArea ( int *cx1, int *cy1, int *cx2, int *cy2 );
- int LANG pgGetClipping ( void );
- int LANG pgGetPrn ( void );
- int LANG pgGetTextHeight ( void );
- int LANG pgGetTextLength ( char * str );
- int LANG pgGetX ( void );
- int LANG pgGetY ( void );
- int LANG pgGetAbsX ( void );
- int LANG pgGetAbsY ( void );
- void LANG pgGetViewPort ( int *x1, int *y1, int *x2, int *y2 );
- /*
- #ifdef __cplusplus
- }
- #endif
- */
- #endif
- #endif