psout.h

Go to the documentation of this file.
00001 
00002 /* ///////////////////////////////////////////////////////////////////////// */
00003 /* This file is a part of the BSTools package                                */
00004 /* written by Przemyslaw Kiciak                                              */
00005 /* ///////////////////////////////////////////////////////////////////////// */
00006 /* (C) Copyright by Przemyslaw Kiciak, 2005, 2010                            */
00007 /* this package is distributed under the terms of the                        */
00008 /* Lesser GNU Public License, see the file COPYING.LIB                       */
00009 /* ///////////////////////////////////////////////////////////////////////// */
00010 
00011 /* Header file for the libpsout library of C procedures -                */
00012 /* generating PostScript (TM) files                                      */ 
00013 
00014 #ifndef PSOUT_H
00015 #define PSOUT_H
00016 
00017 #ifndef PKGEOM_H
00018 #include "pkgeom.h"
00019 #endif
00020 
00021 #define PS_FILE_STACK_LENGTH 4
00022 
00023 #ifdef __cplusplus   
00024 extern "C" {
00025 #endif
00026 
00027 extern short ps_dec_digits;
00028 
00029 boolean ps_OpenFile ( const char *filename, unsigned int dpi );
00030 void ps_CloseFile ( void );
00031 
00032 void ps_Set_Gray ( float gray );
00033 void ps_Set_RGB ( float red, float green, float blue );
00034 void ps_Set_Line_Width ( float w );
00035 
00036 void ps_Draw_Line ( float x1, float y1, float x2, float y2 );
00037 void ps_Set_Clip_Rect ( float w, float h, float x, float y );
00038 void ps_Draw_Rect ( float w, float h, float x, float y );
00039 void ps_Fill_Rect ( float w, float h, float x, float y );
00040 void ps_Hatch_Rect ( float w, float h, float x, float y,
00041                      float ang, float d );
00042 
00043 void ps_Draw_Polyline2f ( int n, const point2f *p );
00044 void ps_Draw_Polyline2d ( int n, const point2d *p );
00045 void ps_Draw_Polyline2Rf ( int n, const point3f *p );
00046 void ps_Draw_Polyline2Rd ( int n, const point3d *p );
00047 void ps_Set_Clip_Polygon2f ( int n, const point2f *p );
00048 void ps_Set_Clip_Polygon2d ( int n, const point2d *p );
00049 void ps_Set_Clip_Polygon2Rf ( int n, const point3f *p );
00050 void ps_Set_Clip_Polygon2Rd ( int n, const point3d *p );
00051 void ps_Fill_Polygon2f ( int n, const point2f *p );
00052 void ps_Fill_Polygon2d ( int n, const point2d *p );
00053 void ps_Fill_Polygon2Rf ( int n, const point3f *p );
00054 void ps_Fill_Polygon2Rd ( int n, const point3d *p );
00055 
00056 void ps_Draw_BezierCf ( const point2f *p, int n );
00057 void ps_Draw_BezierCd ( const point2d *p, int n );
00058 void ps_Draw_Circle ( float x, float y, float r );
00059 void ps_Fill_Circle ( float x, float y, float r );
00060 void ps_Mark_Circle ( float x, float y );
00061 void ps_Draw_Arc ( float x, float y, float r, float a0, float a1 );
00062 void ps_Write_Command ( char *command );
00063 
00064 void ps_Init_Bitmap ( int w, int h, int x, int y, byte b );
00065 void ps_Init_BitmapP ( int w, int h, int x, int y );
00066 void ps_Init_BitmapRGB ( int w, int h, int x, int y );
00067 void ps_Init_BitmapRGBP ( int w, int h, int x, int y );
00068 void ps_Out_Line ( byte *data );
00069 void ps_Out_LineP ( byte *data );
00070 void ps_Out_LineRGB ( byte *data );
00071 void ps_Out_LineRGBP ( byte *data );
00072 
00073 void ps_Newpath ( void );
00074 void ps_MoveTo ( float x, float y );
00075 void ps_LineTo ( float x, float y );
00076 void ps_ShCone ( float x, float y, float x1, float y1, float x2, float y2 );
00077 
00078 void ps_GSave ( void );
00079 void ps_GRestore ( void );
00080 
00081 void ps_DenseScreen ( void );
00082 void ps_WriteBBox ( float x1, float y1, float x2, float y2 );
00083 void ps_GetSize ( float *x1, float *y1, float *x2, float *y2 );
00084 
00085 void ps_BeginDict ( int n );
00086 void ps_EndDict ( void );
00087 
00088 #define tickl  10.0
00089 #define tickw   2.0
00090 #define tickd   6.0
00091 #define dotr   12.0
00092 #define arrowl 71.0
00093 #define arroww 12.5
00094 
00095 void psl_SetLine ( float x1, float y1, float x2, float y2, float t1,
00096                    float t2 );
00097 void psl_GetPointf ( float t, float *x, float *y );
00098 void psl_GetPointd ( double t, double *x, double *y );
00099 float psl_GetDParam ( float dl );
00100 void psl_GoAlong ( float s, float *x, float *y );
00101 void psl_GoPerp ( float s, float *x, float *y );
00102 
00103 void psl_Tick ( float t );
00104 void psl_BTick ( float t );
00105 void psl_HTick ( float t, boolean left );
00106 void psl_Dot ( float t );
00107 void psl_HDot ( float t );
00108 void psl_TrMark ( float x, float y );
00109 void psl_BlackTrMark ( float x, float y );
00110 void psl_HighTrMark ( float x, float y );
00111 void psl_BlackHighTrMark ( float x, float y );
00112 void psl_LTrMark ( float t );
00113 void psl_BlackLTrMark ( float t );
00114 void psl_HighLTrMark ( float t );
00115 void psl_BlackHighLTrMark ( float t );
00116 void psl_Arrow ( float t, boolean sgn );
00117 void psl_BkArrow ( float t, boolean sgn );
00118 void psl_Draw ( float ta, float tb, float w );
00119 void psl_ADraw ( float ta, float tb, float ea, float eb, float w );
00120 void psl_MapsTo ( float t );
00121 void psl_DrawEye ( float t, byte cc, float mag, float ang );
00122 
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 #endif