equal
deleted
inserted
replaced
11 " |
11 " |
12 |
12 |
13 PrinterStream subclass:#PostscriptPrinterStream |
13 PrinterStream subclass:#PostscriptPrinterStream |
14 instanceVariableNames:'xPos yPos lineBuffer colNr lineNr fFamily fStyle' |
14 instanceVariableNames:'xPos yPos lineBuffer colNr lineNr fFamily fStyle' |
15 classVariableNames:'Prolog Trailer PageProlog PageTrailer FontHeight FontWidth LeftX |
15 classVariableNames:'Prolog Trailer PageProlog PageTrailer FontHeight FontWidth LeftX |
16 TopY LinesPerPage Italic Bold Normal Courier Times Helvetica' |
16 TopY LinesPerPage Italic Bold Normal Courier Times Helvetica' |
17 poolDictionaries:'' |
17 poolDictionaries:'' |
18 category:'Streams-External' |
18 category:'Streams-External' |
19 ! |
19 ! |
20 |
20 |
21 !PostscriptPrinterStream class methodsFor:'documentation'! |
21 !PostscriptPrinterStream class methodsFor:'documentation'! |
46 PrinterStream). |
46 PrinterStream). |
47 " |
47 " |
48 ! |
48 ! |
49 |
49 |
50 version |
50 version |
51 ^ '$Header: /cvs/stx/stx/libbasic2/PostscriptPrinterStream.st,v 1.14 1995-11-23 01:51:31 cg Exp $' |
51 ^ '$Header: /cvs/stx/stx/libbasic2/PostscriptPrinterStream.st,v 1.15 1996-01-27 18:33:23 cg Exp $' |
52 ! ! |
52 ! ! |
53 |
53 |
54 !PostscriptPrinterStream class methodsFor:'initialization'! |
54 !PostscriptPrinterStream class methodsFor:'initialization'! |
55 |
55 |
56 fontNames |
56 fontNames |
66 ! |
66 ! |
67 |
67 |
68 initialize |
68 initialize |
69 |tmpString t fontNr| |
69 |tmpString t fontNr| |
70 |
70 |
71 Normal := 0. |
71 Normal isNil ifTrue:[ |
72 Bold := 1. |
72 Normal := 0. |
73 Italic := 2. |
73 Bold := 1. |
74 |
74 Italic := 2. |
75 Courier := 0. |
75 |
76 Times := 3. |
76 Courier := 0. |
77 Helvetica := 6. |
77 Times := 3. |
78 |
78 Helvetica := 6. |
79 LinesPerPage := 66. |
79 |
80 FontHeight := 200. |
80 LinesPerPage := 66. |
81 FontWidth := 120. |
81 FontHeight := 200. |
82 LeftX := 900. |
82 FontWidth := 120. |
83 TopY := 14900. |
83 LeftX := 900. |
84 |
84 TopY := 14900. |
85 tmpString := |
85 |
|
86 tmpString := |
86 '%!!PS-Adobe-1.0 |
87 '%!!PS-Adobe-1.0 |
87 %%Creator: Smalltalk |
88 %%Creator: Smalltalk |
88 %%DocumentFonts: Courier-Oblique Courier-Bold Courier Times-Italic Times-Bold Times |
89 %%DocumentFonts: Courier-Oblique Courier-Bold Courier Times-Italic Times-Bold Times |
89 save/SmalltalkJob exch def |
90 save/SmalltalkJob exch def |
90 /StartSmalltalkDoc{$smalltalk begin}def |
91 /StartSmalltalkDoc{$smalltalk begin}def |
125 TwoColumn{BarLength 2 div .19 add U 10.2 U moveto 0 -10 U rlineto stroke}if |
126 TwoColumn{BarLength 2 div .19 add U 10.2 U moveto 0 -10 U rlineto stroke}if |
126 }def |
127 }def |
127 end |
128 end |
128 StartSmalltalkDoc % end fixed prolog |
129 StartSmalltalkDoc % end fixed prolog |
129 '. |
130 '. |
130 fontNr := 8. |
131 fontNr := 8. |
131 t := ''. |
132 t := ''. |
132 self fontNames do:[:aName | |
133 self fontNames do:[:aName | |
133 t := t , (fontNr printString) , ' ' |
134 t := t , (fontNr printString) , ' ' |
134 , (FontHeight printString) , ' ' |
135 , (FontHeight printString) , ' ' |
135 , aName , (Character nl) asString. |
136 , aName , (Character nl) asString. |
136 fontNr := fontNr - 1 |
137 fontNr := fontNr - 1 |
137 ]. |
138 ]. |
138 tmpString := tmpString , t. |
139 tmpString := tmpString , t. |
139 tmpString := tmpString , '9 SetUpFonts |
140 tmpString := tmpString , '9 SetUpFonts |
140 '. |
141 '. |
141 Prolog := tmpString. |
142 Prolog := tmpString. |
142 |
143 |
143 PageProlog := |
144 PageProlog := |
144 'StartPage |
145 'StartPage |
145 '. |
146 '. |
146 |
147 |
147 PageTrailer := |
148 PageTrailer := |
148 'EndPage |
149 'EndPage |
149 '. |
150 '. |
150 |
151 |
151 Trailer := |
152 Trailer := |
152 'EndSmalltalkDoc |
153 'EndSmalltalkDoc |
153 SmalltalkJob restore |
154 SmalltalkJob restore |
154 ' |
155 ' |
|
156 ] |
155 ! ! |
157 ! ! |
156 |
158 |
157 !PostscriptPrinterStream methodsFor:'access writing'! |
159 !PostscriptPrinterStream methodsFor:'access writing'! |
158 |
160 |
159 bold |
161 bold |