Main Page | Modules | File List | Related Pages

g2_PS_definitions.h

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 00020 /* 00021 * 00022 * Sizes for paper defined in g2_PS.h 00023 * Size is in 1/72 inch (=0.351mm) 00024 */ 00025 static int g2_PS_paper_size[][2]={ 00026 { 2384, 3370 }, /* g2_A0 - A0 */ 00027 { 1684, 2384 }, /* g2_A1 - A1 */ 00028 { 1191, 1684 }, /* g2_A2 - A2 */ 00029 { 842, 1191 }, /* g2_A3 - A3 */ 00030 { 595, 842 }, /* g2_A4 - A4 */ 00031 { 420, 595 }, /* g2_A5 - A5 */ 00032 { 297, 420 }, /* g2_A6 - A6 */ 00033 { 210, 297 }, /* g2_A7 - A7 */ 00034 { 148, 210 }, /* g2_A8 - A8 */ 00035 { 105, 148 }, /* g2_A9 - A9 */ 00036 { 2920, 4127 }, /* g2_B0 - B0 */ 00037 { 2064, 2920 }, /* g2_B1 - B1 */ 00038 { 1460, 2064 }, /* g2_B2 - B2 */ 00039 { 1032, 1460 }, /* g2_B3 - B3 */ 00040 { 729, 1032 }, /* g2_B4 - B4 */ 00041 { 516, 729 }, /* g2_B5 - B5 */ 00042 { 363, 516 }, /* g2_B6 - B6 */ 00043 { 258, 363 }, /* g2_B7 - B7 */ 00044 { 181, 258 }, /* g2_B8 - B8 */ 00045 { 127, 181 }, /* g2_B9 - B9 */ 00046 { 91, 127 }, /* g2_B10 - B10 */ 00047 { 297, 684 }, /* g2_Comm_10_Envelope - Comm #10 Envelope */ 00048 { 461, 648 }, /* g2_C5_Envelope - C5 Envelope */ 00049 { 312, 624 }, /* g2_DL_Envelope - DL Envelope */ 00050 { 595, 935 }, /* g2_Folio - Folio */ 00051 { 522, 756 }, /* g2_Executive - Executive */ 00052 { 612, 792 }, /* g2_Letter - Letter */ 00053 { 612, 1008 }, /* g2_Legal - Legal */ 00054 { 1224, 792 }, /* g2_Ledger - Ledger */ 00055 { 792, 1224 } /* g2_Tabloid - Tabloid */ 00056 }; 00057 00058 00059 /* 00060 * 00061 * PS operators 00062 * 00063 */ 00064 char *g2_PS_operators[]={ 00065 " /L { lineto } def", /* lineto */ 00066 " /St { stroke } def", /* stroke */ 00067 " /M { moveto } def", /* moveto */ 00068 " /P {", /* plot */ 00069 " gsave newpath [] 0 setdash 1 setlinecap 0 setlinewidth", 00070 " 0.2 sub exch 0.2 sub exch moveto 0.4 0.4 rlineto", 00071 " stroke grestore} def", 00072 " /T {", /* triangle */ 00073 " newpath", 00074 " moveto lineto lineto", 00075 " closepath stroke} def", 00076 " /FT {", /* filled triangle */ 00077 " newpath", 00078 " moveto lineto lineto", 00079 " closepath fill} def", 00080 " /R {", /* rectangle */ 00081 " newpath", 00082 " 3 index 1 index 6 4 roll 5 index 1 index", 00083 " moveto lineto lineto lineto closepath stroke} def", 00084 " /FR {", /* filled rectangle */ 00085 " newpath", 00086 " 3 index 1 index 6 4 roll 5 index 1 index", 00087 " moveto lineto lineto lineto closepath fill} def", 00088 " /A {", /* arc */ 00089 " gsave /g2_old_matrix matrix currentmatrix def newpath", 00090 " translate scale 0 0 1 5 3 roll arc", 00091 " g2_old_matrix setmatrix stroke grestore } def", 00092 " /FA {", /* filled arc */ 00093 " gsave /g2_old_matrix matrix currentmatrix def newpath", 00094 " translate scale 0 0 moveto 0 0 1 5 3 roll arc closepath", 00095 " g2_old_matrix setmatrix fill grestore } def", 00096 " /S {", /* draw string */ 00097 " gsave newpath", 00098 " translate 0 0 moveto show", 00099 " stroke grestore} def", 00100 "\n", 00101 NULL 00102 }; 00103 00104

Generated on Tue Jun 14 23:33:58 2005 for g2 by doxygen 1.3.7