00001 /***************************************************************************** 00002 ** Copyright (C) 1998-2001 Ljubomir Milanovic & Horst Wagner 00003 ** This file is part of the g2 library 00004 ** 00005 ** This library is free software; you can redistribute it and/or 00006 ** modify it under the terms of the GNU Lesser General Public 00007 ** License as published by the Free Software Foundation; either 00008 ** version 2.1 of the License, or (at your option) any later version. 00009 ** 00010 ** This library is distributed in the hope that it will be useful, 00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 ** Lesser General Public License for more details. 00014 ** 00015 ** You should have received a copy of the GNU Lesser General Public 00016 ** License along with this library; if not, write to the Free Software 00017 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 ******************************************************************************/ 00019 #ifndef _G2_FUNIX_H 00020 #define _G2_FUNIX_H 00021 00022 /* 00023 * 00024 * FUNction IndeX enumeration 00025 * 00026 */ 00027 00028 #define G2_N_FUNIX 30 /* WARNING !! */ 00029 /* number of funix excl. g2_FUNIX_NULL !!! */ 00030 00031 typedef enum g2_funix { 00032 g2_FUNIX_NULL=-1, /* null funix (_don't_ _count_ in G2_N_FUNIX !!!!) */ 00033 00034 g2_DoNothing=0, /* do nothing */ 00035 /* ... = */ 00036 00037 g2_Delete, /* delete physical device */ 00038 /* ... = */ 00039 00040 g2_Ink, /* set ink */ 00041 /* ... = (int)red, (int)green, (int)blue */ 00042 /* 0 < (red,green,blue) < 65535 (=0xFFFF) */ 00043 /* ret: color id(>=0), <0 if error */ 00044 00045 g2_Pen, /* set pen */ 00046 /* ... = (int)pen */ 00047 00048 g2_SetBackground, /* set background */ 00049 /* ... = (int)pen */ 00050 00051 g2_ClearPalette, /* reset color pallete to default values */ 00052 /* ... = */ 00053 /* for list of default colors (0,31) see later */ 00054 00055 g2_SetLineWidth, /* set line width (line, rectangle, ...) */ 00056 /* ... = (double)line width */ 00057 00058 g2_SetDash, /* set line dash */ 00059 /* ... = (int)number of descr., (double*) bw list */ 00060 00061 g2_SetFontSize, /* set font size */ 00062 /* ... = (double)font size */ 00063 00064 g2_Clear, /* clear screen(X11), print page(PostScript), ... */ 00065 /* ... = */ 00066 00067 g2_Flush, /* update output */ 00068 /* X11: Flush, PostScript: fflush, ... */ 00069 00070 g2_Save, /* save output to device (e.g. file) */ 00071 /* X11: Flush, etc. */ 00072 00073 g2_Plot, /* plot point */ 00074 /* ... = (double)x, (double)y */ 00075 00076 g2_Line, /* draw line */ 00077 /* ... = (double)x1, (double)y1, 00078 (double)x2, (double)y2 */ 00079 00080 g2_PolyLine, /* draw poly line */ 00081 /* ... = (int)N, 00082 (double*)dp 00083 dp[0]=x1, dp[1]=y1, 00084 ... 00085 dp[2*N-2]=xN, dp[2*N-1]=yN */ 00086 00087 g2_Polygon, /* draw polygon */ 00088 /* ... = (int)N, 00089 (double*)dp 00090 dp[0]=x1, dp[1]=y1, 00091 ... 00092 dp[2*N-2]=xN, dp[2*N-1]=yN */ 00093 00094 g2_FilledPolygon, /* draw filled polygon */ 00095 /* ... = (int)N, 00096 (double*)dp 00097 dp[0]=x1, dp[1]=y1, 00098 ... 00099 dp[2*N-2]=xN, dp[2*N-1]=yN */ 00100 00101 g2_Rectangle, /* draw rectangle */ 00102 /* ... = (double)x1, (double)y1, 00103 (double)x2, (double)y2 */ 00104 00105 g2_FilledRectangle, /* draw filled rectangle */ 00106 /* ... = (double)x1, (double)x1, 00107 (double)x2, (double)y2 */ 00108 00109 g2_Triangle, /* draw triangle (should be faster as lines) */ 00110 /* ... = (double)x1, (double)y1, 00111 (double)x2, (double)y2, 00112 (double)x3, (double)y3 */ 00113 00114 g2_FilledTriangle, /* draw filled triangle */ 00115 /* ... = (double)x1, (double)y1, 00116 (double)x2, (double)y2, 00117 (double)x3, (double)y3 */ 00118 00119 g2_Arc, /* draw arc */ 00120 /* ... = (double)x, (double)y, 00121 (double)r1, (double)r2, 00122 (double)a1, (double)a2 */ 00123 00124 g2_FilledArc, /* draw filled arc */ 00125 /* ... = (double)x, (double)y, 00126 (double)r1, (double)r2, 00127 (double)a1, (double)a2 */ 00128 00129 g2_Ellipse, /* draw ellipse */ 00130 /* ... = (double)x, (double)y, 00131 (double)r1, (double)r2 */ 00132 00133 g2_FilledEllipse, /* draw filled ellipse */ 00134 /* ... = (double)x, (double)y, 00135 (double)r1, (double)r2 */ 00136 00137 g2_Circle, /* draw circle */ 00138 /* ... = (double)x, (double)y, 00139 (double)r */ 00140 00141 g2_FilledCircle, /* draw filled circle */ 00142 /* ... = (double)x, (double)y, 00143 (double)r */ 00144 00145 g2_String, /* draw string */ 00146 /* ... = (double)x, (double)y, (const char*)string */ 00147 00148 g2_Image, /* draw (pen) image */ 00149 /* ... = (double)x, (double)y, 00150 (int)x_size, (int)y_size, (int*)pen_array */ 00151 00152 g2_QueryPointer /* query pointer position (mouse) */ 00153 /* ... = (double)*x, (double)*y, 00154 (unsigned int)*button */ 00155 00156 } g2_funix; 00157 00158 00159 #endif /* _G2_FUNIX_H */