author | ca |
Thu, 05 Sep 1996 15:28:15 +0200 | |
changeset 431 | 4d66e2730d76 |
parent 391 | 244f0e731912 |
child 432 | c8b2fa21b747 |
permissions | -rw-r--r-- |
0 | 1 |
" |
4 | 2 |
COPYRIGHT (c) 1988 by Claus Gittinger |
71 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
PrinterStream subclass:#PostscriptPrinterStream |
|
391 | 14 |
instanceVariableNames:'xPos yPos lineBuffer colNr lineNr fFamily fStyle pageStartAction |
15 |
pageEndAction' |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
16 |
classVariableNames:'Prolog Trailer PageProlog PageTrailer FontNames FontHeight |
378 | 17 |
FontWidth LeftX TopY PageHeight LinesPerPage PhysicalPageHeight |
18 |
Italic Bold Normal BoldItalic Courier Times Helvetica TopInset |
|
431 | 19 |
LeftInset BottomInset SupportsColor' |
186
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
20 |
poolDictionaries:'' |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
21 |
category:'Streams-External' |
0 | 22 |
! |
23 |
||
431 | 24 |
!PostscriptPrinterStream class methodsFor:'documentation'! |
6 | 25 |
|
31 | 26 |
copyright |
27 |
" |
|
28 |
COPYRIGHT (c) 1988 by Claus Gittinger |
|
71 | 29 |
All Rights Reserved |
31 | 30 |
|
31 |
This software is furnished under a license and may be used |
|
32 |
only in accordance with the terms of that license and with the |
|
33 |
inclusion of the above copyright notice. This software may not |
|
34 |
be provided or otherwise made available to, or used by, any |
|
35 |
other person. No title to or ownership of the software is |
|
36 |
hereby transferred. |
|
37 |
" |
|
38 |
! |
|
39 |
||
6 | 40 |
documentation |
41 |
" |
|
28 | 42 |
This class provides simple text output to postscript printers; |
31 | 43 |
to use it, evaluate |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
44 |
Smalltalk at:#Printer put:PostscriptPrinterStream |
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
170
diff
changeset
|
45 |
(usually in some rc file). |
361 | 46 |
or change it via the launchers settings-menu. |
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
170
diff
changeset
|
47 |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
48 |
See examples on how to send something to the printer. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
49 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
50 |
For now, only Helvetica, Courier and Times fonts in italic, roman and bold |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
51 |
are supported. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
52 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
53 |
It does not directly support graphics and other fancy features of Postscript, |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
54 |
but provides a compatible interface for simple text line-printing |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
55 |
(see other subclasses of PrinterStream). |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
56 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
57 |
If you already have a postscript string at hand, this can be sent to |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
58 |
the printer in native mode. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
59 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
60 |
To output graphics, you need the PSGraphicsContext (and friend-) classes. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
61 |
These provide protocol similar to the one provided by display graphicContexts. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
62 |
Notice, that these postscript classes are derived from public domain code; |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
63 |
there is no warranty. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
64 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
65 |
[see also:] |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
66 |
PSGraphicsContext |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
67 |
EpsonFX1PrinterStream HPLjetIIPrinterStream PrinterStream |
259 | 68 |
|
69 |
[author:] |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
70 |
Claus Gittinger |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
71 |
" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
72 |
! |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
73 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
74 |
examples |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
75 |
" |
223 | 76 |
For text printing, use: |
391 | 77 |
[exBegin] |
78 |
|s| |
|
223 | 79 |
|
391 | 80 |
s := Printer new. |
81 |
s nextPutAll:'hello'; cr. |
|
82 |
s nextPutAll:'normal '. |
|
83 |
s bold; nextPutAll:'this is bold'; normal; cr. |
|
84 |
s nextPutAll:'normal '. |
|
85 |
s italic; nextPutAll:'this is italic'; normal; cr. |
|
86 |
s nextPutAll:'normal '. |
|
87 |
s boldItalic; nextPutAll:'this is boldItalic'; normal; cr. |
|
88 |
s nextPutAll:'normal '. |
|
89 |
s underline; nextPutAll:'this is underlined'; noUnderline; cr. |
|
90 |
s nextPutAll:'normal again '. |
|
91 |
s strikeout; nextPutAll:'this is strikedout'; noStrikeout; cr. |
|
92 |
s helvetica. |
|
93 |
s nextPutAll:'helvetica '. |
|
94 |
s underline; nextPutAll:' helv-underline'; noUnderline; |
|
95 |
space; strikeout; nextPutAll:'helv-strikeout'; noStrikeout; |
|
96 |
bold; nextPutAll:' helv-bold'; normal; cr. |
|
97 |
s times. |
|
98 |
s nextPutAll:'times'; cr. |
|
99 |
s courier. |
|
100 |
s nextPutAll:'courier'; cr. |
|
101 |
s close |
|
102 |
[exEnd] |
|
349 | 103 |
or, if you already have emphasized text at hand: |
391 | 104 |
[exBegin] |
105 |
|s| |
|
349 | 106 |
|
391 | 107 |
s := Printer new. |
108 |
s nextPutAll:'hello'; cr. |
|
109 |
s nextPutAll:'this is '; |
|
110 |
nextPutAll:(Text string:'bold' emphasis:#bold); |
|
111 |
cr; |
|
112 |
nextPutAll:'this is '; |
|
113 |
nextPutAll:(Text string:'italic' emphasis:#italic); |
|
114 |
cr; |
|
115 |
nextPutAll:'this is '; |
|
116 |
nextPutAll:(Text string:'boldItalic' emphasis:#(bold italic)); |
|
117 |
cr; |
|
118 |
nextPutAll:'normal again'; |
|
119 |
cr; |
|
120 |
helvetica; |
|
121 |
nextPutAll:'helvetica'; |
|
122 |
cr; |
|
123 |
times; |
|
124 |
nextPutAll:'times'; |
|
125 |
cr; |
|
126 |
courier; |
|
127 |
nextPutAll:'courier'; |
|
128 |
cr. |
|
129 |
s close |
|
130 |
[exEnd] |
|
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
170
diff
changeset
|
131 |
|
361 | 132 |
placing a page-hook, to add a page number: |
133 |
(page hooks require that you understand some postscript ... |
|
134 |
... and have a look at how this class generates its postscript code) |
|
391 | 135 |
[exBegin] |
136 |
|s hook pageNr| |
|
361 | 137 |
|
391 | 138 |
s := Printer new. |
361 | 139 |
|
391 | 140 |
pageNr := 0. |
141 |
hook := [ |
|
361 | 142 |
|
391 | 143 |
pageNr := pageNr + 1. |
144 |
s placeString:('page ' , pageNr printString) at:(5500 @ 400). |
|
145 |
]. |
|
361 | 146 |
|
391 | 147 |
s pageEndAction:hook. |
148 |
(1 to:200) do:[:lineNr | |
|
149 |
s nextPutAll:'line ' , lineNr printString. |
|
150 |
s cr. |
|
151 |
]. |
|
152 |
s close. |
|
153 |
[exEnd] |
|
361 | 154 |
|
155 |
||
156 |
placing a page-hook, to add a custom frame, logo or company letter-head: |
|
157 |
(page hooks require that you understand some postscript ... |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
158 |
... and have a look at how this class generates its postscript code. |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
159 |
... and notice that the code below is a q&d demo, working with letter-sized |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
160 |
pages only; a real program should ask the printerStream about the actual |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
161 |
pageHeight/pageWidth.) |
391 | 162 |
[exBegin] |
163 |
|s hook pageNr| |
|
361 | 164 |
|
391 | 165 |
s := Printer new. |
361 | 166 |
|
391 | 167 |
pageNr := 0. |
168 |
hook := [ |
|
361 | 169 |
|
391 | 170 |
pageNr := pageNr + 1. |
171 |
s placeString:('page ' , pageNr printString) at:(5500 @ 400). |
|
172 |
s placeString:('Document revision:') at:(900 @ 1200). |
|
173 |
s placeString:('Revieved by:') at:(900 @ 900). |
|
361 | 174 |
|
391 | 175 |
s setNative:true. |
176 |
s nextPutAll:'0 setlinewidth'; cr. |
|
177 |
s nextPutAll:'800 800 moveto'; cr. |
|
178 |
s nextPutAll:'11000 800 lineto'; cr. |
|
179 |
s nextPutAll:'11000 15500 lineto'; cr. |
|
180 |
s nextPutAll:'800 15500 lineto'; cr. |
|
181 |
s nextPutAll:'800 800 lineto'; cr. |
|
182 |
s nextPutAll:'stroke'; cr. |
|
361 | 183 |
|
391 | 184 |
s nextPutAll:'800 1100 moveto'; cr. |
185 |
s nextPutAll:'11000 1100 lineto'; cr. |
|
186 |
s nextPutAll:'stroke'; cr. |
|
361 | 187 |
|
391 | 188 |
s nextPutAll:'800 1400 moveto'; cr. |
189 |
s nextPutAll:'11000 1400 lineto'; cr. |
|
190 |
s nextPutAll:'stroke'; cr. |
|
361 | 191 |
|
391 | 192 |
s setNative:false. |
193 |
]. |
|
361 | 194 |
|
391 | 195 |
s pageEndAction:hook. |
196 |
(1 to:200) do:[:lineNr | |
|
197 |
s nextPutAll:'line ' , lineNr printString. |
|
198 |
s cr. |
|
199 |
]. |
|
200 |
s close. |
|
201 |
[exEnd] |
|
361 | 202 |
|
203 |
||
223 | 204 |
If you already have a postscript string at hand, this can be sent to |
205 |
the printer in native mode: |
|
391 | 206 |
[exBegin] |
207 |
|s| |
|
223 | 208 |
|
391 | 209 |
s := Printer newNative. |
210 |
s nextPutAll:<your postscript string>. |
|
211 |
[exEnd] |
|
212 |
s close |
|
223 | 213 |
|
179
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
170
diff
changeset
|
214 |
To output graphics, you need the PSGraphicsContext (and friend-) classes. |
38773360f4b7
more on printing (printerType-query)
Claus Gittinger <cg@exept.de>
parents:
170
diff
changeset
|
215 |
These provide protocol similar to the one provided by display graphicContexts. |
223 | 216 |
Notice, that these postscript classes are derived from public domain code; |
217 |
there is no warranty. |
|
218 |
||
219 |
Usage: |
|
391 | 220 |
[exBegin] |
221 |
|drawable s| |
|
223 | 222 |
|
391 | 223 |
s := Printer newNative. |
224 |
drawable := PSGraphicsContext on:s. |
|
223 | 225 |
|
391 | 226 |
drawable displayLineFrom:(0@0) to:(100@100). |
227 |
drawable displayLineFrom:(100@0) to:(0@100). |
|
228 |
drawable displayCircle:(150@150) radius:50. |
|
229 |
(Image fromFile:'bitmaps/SBrowser.xbm') displayOn:drawable at:(50@30). |
|
223 | 230 |
|
391 | 231 |
drawable close. |
232 |
[exEnd] |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
233 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
234 |
the same in a view: |
391 | 235 |
[exBegin] |
236 |
|drawable| |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
237 |
|
391 | 238 |
drawable := (View extent:200@200) openAndWait. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
239 |
|
391 | 240 |
drawable displayLineFrom:(0@0) to:(100@100). |
241 |
drawable displayLineFrom:(100@0) to:(0@100). |
|
242 |
drawable displayCircle:(150@150) radius:50. |
|
243 |
(Image fromFile:'bitmaps/SBrowser.xbm') displayOn:drawable at:(50@30). |
|
244 |
[exEnd] |
|
6 | 245 |
" |
246 |
! ! |
|
0 | 247 |
|
431 | 248 |
!PostscriptPrinterStream class methodsFor:'initialization'! |
0 | 249 |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
250 |
initCharacterSize |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
251 |
"setup the character parameters" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
252 |
|
361 | 253 |
FontHeight := 200. "/ used to scale fonts - corresponds to a 10 point font size |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
254 |
FontWidth := 120. "/ used to compute width of tabs |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
255 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
256 |
"Created: 23.4.1996 / 19:53:34 / cg" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
257 |
"Modified: 23.4.1996 / 20:05:17 / cg" |
361 | 258 |
"Modified: 30.5.1996 / 17:24:05 / ca" |
0 | 259 |
! |
260 |
||
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
261 |
initFonts |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
262 |
"setup the font names. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
263 |
initProlog uses those parameters." |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
264 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
265 |
Italic := 0. "/ offset from base-font# to italic version |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
266 |
Bold := 1. "/ offset from base-font# to bold version |
349 | 267 |
BoldItalic := 2. "/ offset from base-font# to boldItalic version |
268 |
Normal := 3. "/ offset from base-font# to normal version |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
269 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
270 |
Helvetica := 0. "/ # of helvetica base font |
349 | 271 |
Times := 4. "/ # of times base font |
272 |
Courier := 8. "/ # of courier base font |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
273 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
274 |
FontNames := #( |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
275 |
'/Helvetica-Oblique' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
276 |
'/Helvetica-Bold' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
277 |
'/Helvetica-BoldOblique' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
278 |
'/Helvetica' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
279 |
'/Times-Italic' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
280 |
'/Times-Bold' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
281 |
'/Times-BoldItalic' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
282 |
'/Times' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
283 |
'/Courier-Oblique' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
284 |
'/Courier-Bold' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
285 |
'/Courier-BoldOblique' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
286 |
'/Courier' |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
287 |
) |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
288 |
|
349 | 289 |
"Modified: 18.5.1996 / 09:37:48 / cg" |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
290 |
! |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
291 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
292 |
initPage |
361 | 293 |
"setup the page parameters. |
370 | 294 |
All coordinates are scaled by 20 w.r.t the PS coordinates (i.e. in twips)." |
295 |
||
296 |
PageFormat isNil ifTrue:[ |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
297 |
PageFormat := #letter |
370 | 298 |
]. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
299 |
|
378 | 300 |
TopInset isNil ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
301 |
TopInset := 0.6. "/ inches |
370 | 302 |
]. |
378 | 303 |
BottomInset isNil ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
304 |
BottomInset := 1.2 "/ inches |
370 | 305 |
]. |
378 | 306 |
LeftInset isNil ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
307 |
LeftInset := 0.6. "/ inches |
370 | 308 |
]. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
309 |
|
361 | 310 |
"/ +-----------------------------------------------+ PageHeight |
311 |
"/ | | |
|
312 |
"/ | LeftX +---------------------------------------| TopY |
|
313 |
"/ | |1st printed line | |
|
314 |
"/ | | | |
|
315 |
"/ | | | |
|
316 |
"/ | | | |
|
317 |
"/ | | | |
|
318 |
"/ | |last line (linesPerPage) | |
|
319 |
"/ | +---------------------------------------| |
|
320 |
"/ | | |
|
321 |
"/ (0/0)-------------------------------------------+ 0 |
|
322 |
||
378 | 323 |
LeftX := (UnitConverter convert:LeftInset from:#inch to:#twip) rounded. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
324 |
|
370 | 325 |
PhysicalPageHeight := (UnitConverter convert:1 from:(PageFormat , 'H') to:#twip) rounded. |
326 |
Landscape ifTrue:[ |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
327 |
PageHeight := (UnitConverter convert:1 from:(PageFormat , 'lH') to:#twip) rounded. |
370 | 328 |
] ifFalse:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
329 |
PageHeight := (UnitConverter convert:1 from:(PageFormat , 'H') to:#twip) rounded. |
370 | 330 |
]. |
331 |
||
378 | 332 |
TopY := PageHeight - (UnitConverter convert:TopInset from:#inch to:#twip) rounded. |
333 |
LinesPerPage := TopY - (UnitConverter convert:BottomInset from:#inch to:#twip) rounded // 200. |
|
370 | 334 |
|
386 | 335 |
" |
336 |
TopInset := LeftInset := BottomInset := nil. |
|
337 |
self initPage |
|
338 |
" |
|
339 |
||
361 | 340 |
"Modified: 30.5.1996 / 17:24:55 / ca" |
386 | 341 |
"Modified: 4.6.1996 / 17:18:25 / cg" |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
342 |
! |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
343 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
344 |
initPageProlog |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
345 |
"define the page prolog" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
346 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
347 |
PageProlog := |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
348 |
'StartPage |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
349 |
'. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
350 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
351 |
"Created: 23.4.1996 / 19:56:16 / cg" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
352 |
! |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
353 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
354 |
initPageTrailer |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
355 |
"define the page epilog" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
356 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
357 |
PageTrailer := |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
358 |
'EndPage |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
359 |
'. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
360 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
361 |
"Modified: 23.4.1996 / 19:55:50 / cg" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
362 |
"Created: 23.4.1996 / 19:56:30 / cg" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
363 |
! |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
364 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
365 |
initProlog |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
366 |
"define the documents prolog" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
367 |
|
0 | 368 |
|tmpString t fontNr| |
369 |
||
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
370 |
tmpString := |
0 | 371 |
'%!!PS-Adobe-1.0 |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
372 |
%%Creator: Smalltalk/X |
0 | 373 |
%%DocumentFonts: Courier-Oblique Courier-Bold Courier Times-Italic Times-Bold Times |
374 |
save/SmalltalkJob exch def |
|
361 | 375 |
/OriginalState gstate def |
0 | 376 |
/StartSmalltalkDoc{$smalltalk begin}def |
377 |
/$smalltalk 50 dict def $smalltalk begin |
|
378 |
/EndSmalltalkDoc{end}def |
|
379 |
/S/show load def |
|
380 |
/X{exch 0 rmoveto S}def |
|
381 |
/Y{exch 0 exch rmoveto S}def |
|
382 |
/B{3 1 roll moveto S}def |
|
382 | 383 |
/SUL {gsave currentpoint currentfont /FontInfo get /UnderlinePosition get |
384 |
0 exch currentfont /FontMatrix get dtransform exch pop add newpath moveto |
|
385 |
dup stringwidth rlineto stroke grestore S} def |
|
391 | 386 |
/SSO {gsave currentpoint 300 |
387 |
0 exch currentfont /FontMatrix get dtransform exch pop add |
|
388 |
newpath moveto dup stringwidth rlineto stroke grestore S} def |
|
382 | 389 |
/BUL{3 1 roll moveto SUL}def |
391 | 390 |
/BSO{3 1 roll moveto SSO}def |
0 | 391 |
/F{$fd exch get setfont}def |
392 |
/StartPage{/svpg save def .05 dup scale}def |
|
393 |
/EndPage{svpg restore showpage}def |
|
394 |
/DoPreFeed{/statusdict where{pop |
|
395 |
statusdict/prefeed known{statusdict exch/prefeed exch put 0}if}if pop}def |
|
373 | 396 |
/Landscape{90 rotate 0 -' , PageHeight printString "15840", ' translate}def |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
397 |
/ISOrecode {findfont dup length dict begin |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
398 |
{1 index /FID ne {def} {pop pop} ifelse} forall |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
399 |
/Encoding ISOLatin1Encoding def |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
400 |
currentdict end definefont pop} def |
0 | 401 |
/SetUpFonts |
402 |
{dup/$fd exch array def{findfont exch scalefont $fd 3 1 roll put}repeat}def |
|
403 |
/InitGaudy{/TwoColumn exch def /BarLength exch def |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
404 |
/ftD /ISO-Times-Bold findfont 12 UP scalefont def |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
405 |
/ftF /ISO-Times-Roman findfont 14 UP scalefont def |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
406 |
/ftP /ISO-Helvetica-Bold findfont 30 UP scalefont def}def |
0 | 407 |
/U{1440 mul}def |
408 |
/UP{U 72 div}def |
|
409 |
/LB{/pts exch UP def /charcolor exch def /boxcolor exch def /font exch def |
|
410 |
/label exch def /dy exch def /dx exch def /lly exch def /llx exch def |
|
411 |
gsave boxcolor setgray |
|
412 |
llx lly moveto dx 0 rlineto 0 dy rlineto dx neg 0 rlineto closepath fill |
|
413 |
/lines label length def |
|
414 |
/yp lly dy add dy lines pts mul sub 2 div sub pts .85 mul sub def |
|
415 |
font setfont charcolor setgray |
|
416 |
label {dup stringwidth pop 2 div llx dx 2 div add exch sub yp moveto show |
|
417 |
/yp yp pts sub def}forall grestore}def |
|
418 |
/Gaudy{/Page exch def /Date exch def /File exch def /Comment exch def |
|
419 |
.25 U 10.2 U BarLength .1 sub U .25 U [File] ftF .97 0 14 LB |
|
420 |
.25 U 10.45 U BarLength .1 sub U .25 U [Comment] ftF 1 0 14 LB |
|
421 |
.25 U 10.2 U 1 U .5 U Date ftD .7 0 12 LB |
|
422 |
BarLength .75 sub U 10.2 U 1 U .5 U [Page] ftP .7 1 30 LB |
|
423 |
TwoColumn{BarLength 2 div .19 add U 10.2 U moveto 0 -10 U rlineto stroke}if |
|
424 |
}def |
|
425 |
end |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
426 |
StartSmalltalkDoc |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
427 |
% end of fixed prolog |
0 | 428 |
'. |
429 |
||
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
430 |
t := ''. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
431 |
FontNames do:[:aName | |
391 | 432 |
t := t , '/ISO-' , aName , ' ' , aName , ' ISOrecode |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
433 |
'. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
434 |
]. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
435 |
t := t , ' |
0 | 436 |
'. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
437 |
tmpString := tmpString , t. |
0 | 438 |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
439 |
t := ''. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
440 |
fontNr := 0. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
441 |
FontNames do:[:aName | |
391 | 442 |
t := t , (fontNr printString) , ' ' |
443 |
, (FontHeight printString) , ' ' |
|
444 |
, aName , (Character nl) asString. |
|
445 |
fontNr := fontNr + 1 |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
446 |
]. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
447 |
tmpString := tmpString , t. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
448 |
tmpString := tmpString , fontNr printString , ' SetUpFonts |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
449 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
450 |
% end of prolog |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
451 |
'. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
452 |
Prolog := tmpString. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
453 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
454 |
" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
455 |
PostscriptPrinterStream initProlog |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
456 |
" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
457 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
458 |
"Created: 23.4.1996 / 19:40:44 / cg" |
391 | 459 |
"Modified: 8.6.1996 / 11:40:52 / cg" |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
460 |
! |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
461 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
462 |
initTrailer |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
463 |
"define the documents epilog" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
464 |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
465 |
Trailer := |
0 | 466 |
'EndSmalltalkDoc |
467 |
SmalltalkJob restore |
|
468 |
' |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
469 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
470 |
"Created: 23.4.1996 / 19:55:24 / cg" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
471 |
"Modified: 23.4.1996 / 19:55:38 / cg" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
472 |
! |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
473 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
474 |
initialize |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
475 |
Normal isNil ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
476 |
self initFonts. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
477 |
self initPage. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
478 |
self initCharacterSize. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
479 |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
480 |
self initProlog. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
481 |
self initTrailer. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
482 |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
483 |
self initPageProlog. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
484 |
self initPageTrailer |
170 | 485 |
] |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
486 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
487 |
" |
349 | 488 |
Normal := nil. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
489 |
self initialize |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
490 |
" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
491 |
|
349 | 492 |
"Modified: 18.5.1996 / 09:46:15 / cg" |
370 | 493 |
! |
494 |
||
495 |
reInitPage |
|
496 |
self initPage. |
|
497 |
self initProlog. |
|
498 |
||
499 |
"Created: 31.5.1996 / 23:35:18 / cg" |
|
500 |
! ! |
|
501 |
||
431 | 502 |
!PostscriptPrinterStream class methodsFor:'accessing - defaults'! |
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
503 |
|
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
504 |
bottomInset |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
505 |
"return the bottom margin (in inches)" |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
506 |
|
378 | 507 |
^ BottomInset |
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
508 |
|
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
509 |
"Created: 1.6.1996 / 13:07:43 / cg" |
378 | 510 |
"Modified: 3.6.1996 / 10:44:44 / cg" |
511 |
! |
|
512 |
||
513 |
bottomInset:inches |
|
514 |
"set the bottom margin (in inches)" |
|
515 |
||
516 |
BottomInset := inches. |
|
517 |
self reInitPage. |
|
518 |
||
519 |
"Created: 3.6.1996 / 10:46:25 / cg" |
|
520 |
"Modified: 3.6.1996 / 10:47:16 / cg" |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
521 |
! |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
522 |
|
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
523 |
leftInset |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
524 |
"return the left margin (in inches)" |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
525 |
|
378 | 526 |
^ LeftInset |
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
527 |
|
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
528 |
"Created: 1.6.1996 / 13:07:12 / cg" |
378 | 529 |
"Modified: 3.6.1996 / 10:45:11 / cg" |
530 |
! |
|
531 |
||
532 |
leftInset:inches |
|
533 |
"set the left margin (in inches)" |
|
534 |
||
535 |
LeftInset := inches. |
|
536 |
self reInitPage. |
|
537 |
||
538 |
"Created: 3.6.1996 / 10:46:33 / cg" |
|
539 |
"Modified: 3.6.1996 / 10:47:21 / cg" |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
540 |
! |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
541 |
|
431 | 542 |
supportsColor |
543 |
SupportsColor notNil ifTrue:[^ SupportsColor]. |
|
544 |
^ false |
|
545 |
! |
|
546 |
||
547 |
supportsColor:aBoolean |
|
548 |
SupportsColor := aBoolean. |
|
549 |
! |
|
550 |
||
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
551 |
topInset |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
552 |
"return the top margin (in inches)" |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
553 |
|
378 | 554 |
^ TopInset |
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
555 |
|
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
556 |
"Created: 1.6.1996 / 13:07:20 / cg" |
378 | 557 |
"Modified: 3.6.1996 / 10:45:17 / cg" |
558 |
! |
|
559 |
||
560 |
topInset:inches |
|
561 |
"set the top margin (in inches)" |
|
562 |
||
563 |
TopInset := inches. |
|
564 |
self reInitPage. |
|
565 |
||
566 |
"Created: 3.6.1996 / 10:46:41 / cg" |
|
567 |
"Modified: 3.6.1996 / 10:47:26 / cg" |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
568 |
! ! |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
569 |
|
431 | 570 |
!PostscriptPrinterStream class methodsFor:'queries'! |
186
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
571 |
|
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
572 |
printerTypeName |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
573 |
"return a descriptive name" |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
574 |
|
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
575 |
^ 'postscript printer' |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
576 |
! |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
577 |
|
378 | 578 |
supportsMargins |
579 |
"return true if this printer supports margins" |
|
580 |
||
581 |
^ true |
|
582 |
||
583 |
"Created: 3.6.1996 / 10:48:04 / cg" |
|
584 |
! |
|
585 |
||
368
423cf3f4e522
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
361
diff
changeset
|
586 |
supportsPageSizes |
423cf3f4e522
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
361
diff
changeset
|
587 |
"return true if this printer supports different page sizes" |
423cf3f4e522
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
361
diff
changeset
|
588 |
|
423cf3f4e522
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
361
diff
changeset
|
589 |
^ true |
423cf3f4e522
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
361
diff
changeset
|
590 |
|
423cf3f4e522
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
361
diff
changeset
|
591 |
"Created: 31.5.1996 / 22:35:39 / cg" |
423cf3f4e522
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
361
diff
changeset
|
592 |
! |
423cf3f4e522
added query if printer supports pages at all (only PS does)
Claus Gittinger <cg@exept.de>
parents:
361
diff
changeset
|
593 |
|
186
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
594 |
supportsPostscript |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
595 |
"return true if this is a postscript printer" |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
596 |
|
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
597 |
^ true |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
598 |
|
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
599 |
"Created: 10.2.1996 / 16:23:23 / cg" |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
600 |
! ! |
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
601 |
|
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
602 |
!PostscriptPrinterStream methodsFor:'access writing'! |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
603 |
|
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
604 |
cr |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
605 |
"send line termination" |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
606 |
|
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
607 |
self flushLine. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
608 |
native == true ifTrue:[^ super cr]. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
609 |
|
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
610 |
xPos := LeftX. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
611 |
colNr := 0. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
612 |
yPos := yPos - FontHeight. |
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
613 |
|
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
614 |
lineNr := lineNr + 1. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
615 |
lineNr > LinesPerPage ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
616 |
self nextPage |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
617 |
] |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
618 |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
619 |
"Modified: 1.6.1996 / 13:09:30 / cg" |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
620 |
! |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
621 |
|
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
622 |
nextPut:aCharacter |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
623 |
|code| |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
624 |
|
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
625 |
(aCharacter == Character cr) ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
626 |
^ self cr |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
627 |
]. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
628 |
|
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
629 |
native == true ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
630 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
631 |
^ super nextPut:aCharacter |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
632 |
]. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
633 |
|
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
634 |
(aCharacter == $( ) ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
635 |
lineBuffer := lineBuffer , '\(' . |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
636 |
^ self |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
637 |
]. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
638 |
(aCharacter == $) ) ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
639 |
lineBuffer := lineBuffer , '\)' . |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
640 |
^ self |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
641 |
]. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
642 |
(aCharacter == $\ ) ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
643 |
lineBuffer := lineBuffer , '\\' . |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
644 |
^ self |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
645 |
]. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
646 |
|
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
647 |
(aCharacter == Character tab ) ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
648 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
649 |
colNr := ((colNr + 8) // 8) * 8. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
650 |
xPos := LeftX + (colNr * FontWidth). |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
651 |
^ self |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
652 |
]. |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
653 |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
654 |
(code := aCharacter asciiValue) > 16r7F ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
655 |
lineBuffer := lineBuffer , '\' , (code printStringRadix:8) |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
656 |
] ifFalse:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
657 |
lineBuffer := lineBuffer copyWith:aCharacter |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
658 |
]. |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
659 |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
660 |
"Modified: 23.4.1996 / 20:05:59 / cg" |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
661 |
! ! |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
662 |
|
361 | 663 |
!PostscriptPrinterStream methodsFor:'accessing'! |
664 |
||
665 |
pageEndAction:something |
|
666 |
"set pageEndAction - if non-nil, that will be called before |
|
667 |
and EndPage is emmitted. |
|
668 |
An example use is a private block, |
|
669 |
which draws a company frame around the page ..." |
|
670 |
||
671 |
pageEndAction := something. |
|
672 |
||
673 |
"Modified: 30.5.1996 / 16:45:09 / ca" |
|
674 |
! |
|
675 |
||
676 |
pageStartAction:something |
|
677 |
"set pageStartAction - if nonNil, that is evaluated prior to every page." |
|
678 |
||
679 |
pageStartAction := something. |
|
680 |
||
681 |
"Modified: 30.5.1996 / 16:44:20 / ca" |
|
682 |
! ! |
|
683 |
||
348 | 684 |
!PostscriptPrinterStream methodsFor:'emphasis change'! |
685 |
||
686 |
bold |
|
687 |
"further printing is in bold" |
|
688 |
||
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
689 |
(fStyle ~~ Bold) ifTrue:[ |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
690 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
691 |
fStyle := Bold. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
692 |
self setFont. |
382 | 693 |
]. |
348 | 694 |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
695 |
"Modified: 8.6.1996 / 08:17:15 / cg" |
348 | 696 |
! |
697 |
||
349 | 698 |
boldItalic |
699 |
"further printing is in boldItalic" |
|
700 |
||
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
701 |
(fStyle ~~ BoldItalic) ifTrue:[ |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
702 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
703 |
fStyle := BoldItalic. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
704 |
self setFont. |
382 | 705 |
]. |
349 | 706 |
|
707 |
"Created: 18.5.1996 / 09:36:36 / cg" |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
708 |
"Modified: 8.6.1996 / 08:17:21 / cg" |
349 | 709 |
! |
710 |
||
348 | 711 |
italic |
712 |
"further printing is in italic" |
|
713 |
||
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
714 |
(fStyle ~~ Italic) ifTrue:[ |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
715 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
716 |
fStyle := Italic. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
717 |
self setFont. |
382 | 718 |
]. |
348 | 719 |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
720 |
"Modified: 8.6.1996 / 08:17:28 / cg" |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
721 |
! |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
722 |
|
391 | 723 |
noStrikeout |
724 |
"further printing is not strikedout" |
|
725 |
||
726 |
strikeout ifTrue:[ |
|
727 |
self flushLine. |
|
728 |
strikeout := false |
|
729 |
] |
|
730 |
||
731 |
"Modified: 8.6.1996 / 08:15:56 / cg" |
|
732 |
"Created: 8.6.1996 / 08:16:35 / cg" |
|
733 |
! |
|
734 |
||
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
735 |
noUnderline |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
736 |
"further printing is not underlined" |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
737 |
|
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
738 |
underline ifTrue:[ |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
739 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
740 |
underline := false |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
741 |
] |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
742 |
|
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
743 |
"Created: 8.6.1996 / 08:11:07 / cg" |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
744 |
"Modified: 8.6.1996 / 08:15:56 / cg" |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
745 |
! |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
746 |
|
348 | 747 |
normal |
748 |
"further printing is in normal style (i.e. non-bold/non-italic)" |
|
749 |
||
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
750 |
(fStyle ~~ Normal) ifTrue:[ |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
751 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
752 |
fStyle := Normal. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
753 |
self setFont. |
380 | 754 |
]. |
348 | 755 |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
756 |
"Modified: 8.6.1996 / 08:17:34 / cg" |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
757 |
! |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
758 |
|
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
759 |
strikeout |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
760 |
"further printing is strikedout" |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
761 |
|
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
762 |
strikeout ifFalse:[ |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
763 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
764 |
strikeout := true |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
765 |
] |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
766 |
|
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
767 |
"Modified: 8.6.1996 / 08:10:49 / cg" |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
768 |
"Created: 8.6.1996 / 08:16:18 / cg" |
382 | 769 |
! |
770 |
||
771 |
underline |
|
772 |
"further printing is underlined" |
|
773 |
||
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
774 |
underline ifFalse:[ |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
775 |
self flushLine. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
776 |
underline := true |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
777 |
] |
382 | 778 |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
779 |
"Modified: 8.6.1996 / 08:16:05 / cg" |
348 | 780 |
! ! |
781 |
||
782 |
!PostscriptPrinterStream methodsFor:'font change'! |
|
783 |
||
784 |
courier |
|
785 |
"further printing is in the courier font" |
|
786 |
||
787 |
self flushLine. |
|
788 |
fFamily := Courier. |
|
789 |
self setFont |
|
790 |
||
791 |
"Modified: 10.4.1996 / 13:34:49 / cg" |
|
792 |
! |
|
793 |
||
794 |
helvetica |
|
795 |
"further printing is in the helvetica font" |
|
796 |
||
797 |
self flushLine. |
|
798 |
fFamily := Helvetica. |
|
799 |
self setFont |
|
800 |
||
801 |
"Modified: 10.4.1996 / 13:34:58 / cg" |
|
802 |
! |
|
803 |
||
804 |
times |
|
805 |
"further printing is in the times font" |
|
806 |
||
807 |
self flushLine. |
|
808 |
fFamily := Times. |
|
809 |
self setFont |
|
810 |
||
811 |
"Modified: 10.4.1996 / 13:36:07 / cg" |
|
812 |
! ! |
|
813 |
||
126 | 814 |
!PostscriptPrinterStream methodsFor:'open/close'! |
815 |
||
816 |
endPrint |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
817 |
"finish a document - finish page; then send documentTrailer. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
818 |
Send nothing if nativePrinting." |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
819 |
|
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
820 |
native == true ifFalse:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
821 |
self endPage. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
822 |
super nextPutAllUntranslated:Trailer. |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
823 |
]. |
126 | 824 |
super endPrint |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
825 |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
826 |
"Modified: 23.4.1996 / 20:03:26 / cg" |
0 | 827 |
! |
828 |
||
126 | 829 |
startPrint |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
830 |
"start a document - send documentProlog & start a page. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
831 |
Send nothing if nativePrinting." |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
832 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
833 |
fFamily := Courier. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
834 |
fStyle := Normal. |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
835 |
underline := false. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
836 |
strikeout := false. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
837 |
|
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
838 |
native == true ifFalse:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
839 |
Prolog isNil ifTrue:[ |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
840 |
self class initialize |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
841 |
]. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
842 |
super writingTo:(self class printCommand). |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
843 |
super nextPutAllUntranslated:Prolog. |
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
844 |
self startPage |
222
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
845 |
] |
15d1c9a82bc6
suppress trailer in native printing (used to disturb the output of html printouts)
Claus Gittinger <cg@exept.de>
parents:
186
diff
changeset
|
846 |
|
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
847 |
"Modified: 8.6.1996 / 08:16:50 / cg" |
126 | 848 |
! ! |
849 |
||
850 |
!PostscriptPrinterStream methodsFor:'private'! |
|
851 |
||
852 |
endPage |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
853 |
"end a page - flush buffered text & send pageTrailer" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
854 |
|
0 | 855 |
self flushLine. |
361 | 856 |
pageEndAction notNil ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
857 |
pageEndAction value |
361 | 858 |
]. |
126 | 859 |
super nextPutAllUntranslated:PageTrailer |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
860 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
861 |
"Modified: 23.4.1996 / 20:00:01 / cg" |
0 | 862 |
! |
863 |
||
126 | 864 |
flushLine |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
865 |
"flush buffered line text" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
866 |
|
391 | 867 |
|sendXPosition| |
868 |
||
126 | 869 |
(lineBuffer size > 0) ifTrue:[ |
391 | 870 |
sendXPosition := false. |
871 |
colNr == 0 ifTrue:[ |
|
872 |
super nextPutAllUntranslated:(xPos printString ). |
|
873 |
super nextPutAllUntranslated:' '. |
|
874 |
super nextPutAllUntranslated:(yPos printString). |
|
875 |
sendXPosition := true. |
|
876 |
]. |
|
877 |
super nextPutAllUntranslated:'('. |
|
878 |
super nextPutAllUntranslated:lineBuffer. |
|
879 |
super nextPutAllUntranslated:')'. |
|
880 |
sendXPosition ifTrue:[ |
|
881 |
super nextPutAllUntranslated:'B'. |
|
882 |
] ifFalse:[ |
|
883 |
super nextPutAllUntranslated:'S'. |
|
884 |
]. |
|
885 |
underline == true ifTrue:[ |
|
886 |
super nextPutAllUntranslated:'UL'. |
|
887 |
] ifFalse:[ |
|
888 |
strikeout == true ifTrue:[ |
|
889 |
super nextPutAllUntranslated:'SO'. |
|
890 |
] |
|
891 |
]. |
|
892 |
||
893 |
super nextPutUntranslated:(Character cr). |
|
894 |
xPos := xPos + (FontWidth * lineBuffer size). |
|
895 |
colNr := colNr + lineBuffer size |
|
126 | 896 |
]. |
897 |
lineBuffer := '' |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
898 |
|
391 | 899 |
"Modified: 8.6.1996 / 11:40:29 / cg" |
126 | 900 |
! |
901 |
||
902 |
nextPage |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
903 |
"new page - finish previous page & start enew. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
904 |
Should not be sent when nativePrinting." |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
905 |
|
126 | 906 |
self endPage. |
907 |
self startPage |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
908 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
909 |
"Modified: 23.4.1996 / 20:04:07 / cg" |
0 | 910 |
! |
911 |
||
361 | 912 |
placeString:aString at:pos |
913 |
"special entry: place a string at some particular position in my ps-coordinate |
|
914 |
system. Can be used with endPageActions to place a page-number." |
|
915 |
||
916 |
self flushLine. |
|
917 |
super nextPutAllUntranslated:(pos x printString ). |
|
918 |
super nextPutAllUntranslated:' '. |
|
919 |
super nextPutAllUntranslated:(pos y printString). |
|
920 |
super nextPutAllUntranslated:'('. |
|
921 |
super nextPutAllUntranslated:aString. |
|
922 |
super nextPutAllUntranslated:')B'. |
|
923 |
super nextPutUntranslated:(Character cr). |
|
924 |
||
925 |
"Created: 30.5.1996 / 17:06:36 / ca" |
|
926 |
! |
|
927 |
||
126 | 928 |
setFont |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
929 |
"change the font. |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
930 |
Uses current fFamily and fStyle (which give the fonts nr)" |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
931 |
|
126 | 932 |
|fontNumber| |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
933 |
|
126 | 934 |
fontNumber := fFamily + fStyle. |
935 |
super nextPutAllUntranslated:fontNumber printString. |
|
936 |
super nextPutAllUntranslated:' F'. |
|
937 |
super nextPutUntranslated:(Character cr) |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
938 |
|
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
939 |
"Modified: 23.4.1996 / 20:01:28 / cg" |
0 | 940 |
! |
941 |
||
126 | 942 |
startPage |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
943 |
"start a page - send pageProlog, reset x/y position and line/col." |
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
944 |
|
361 | 945 |
pageStartAction notNil ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
946 |
pageStartAction value |
361 | 947 |
]. |
126 | 948 |
super nextPutAllUntranslated:PageProlog. |
373 | 949 |
self class landscape ifTrue:[ |
390
3f22865fa873
fixed handling of underline; no longer affects bold/italic setting.
Claus Gittinger <cg@exept.de>
parents:
386
diff
changeset
|
950 |
super nextPutAllUntranslated:'Landscape |
373 | 951 |
'. |
952 |
]. |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
953 |
|
126 | 954 |
self setFont. |
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
955 |
|
126 | 956 |
yPos := TopY. |
957 |
xPos := LeftX. |
|
958 |
lineBuffer := ''. |
|
959 |
lineNr := 1. |
|
960 |
colNr := 0 |
|
246
ba03a2af594c
fixed ISO-latin1 encoding (national characters)
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
961 |
|
373 | 962 |
"Modified: 1.6.1996 / 00:44:10 / cg" |
0 | 963 |
! ! |
126 | 964 |
|
361 | 965 |
!PostscriptPrinterStream methodsFor:'queries'! |
966 |
||
967 |
fontHeight |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
968 |
"the used fonts height in my postscript coordinate system |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
969 |
(i.e. in twips, which is 1/20th of a point)" |
361 | 970 |
|
971 |
^ FontHeight |
|
972 |
||
973 |
"Modified: 30.5.1996 / 16:47:37 / ca" |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
974 |
"Modified: 1.6.1996 / 13:14:51 / cg" |
361 | 975 |
! |
976 |
||
977 |
leftX |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
978 |
"the left x startPosition (i.e. leftMargin) in my postscript coordinate system. |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
979 |
(i.e. in twips, which is 1/20th of a point)" |
361 | 980 |
|
981 |
^ LeftX |
|
982 |
||
983 |
"Modified: 30.5.1996 / 16:48:56 / ca" |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
984 |
"Modified: 1.6.1996 / 13:14:59 / cg" |
361 | 985 |
! |
986 |
||
987 |
linesPerPage |
|
988 |
"the number of lines per page" |
|
989 |
||
990 |
^ LinesPerPage |
|
991 |
||
992 |
"Modified: 30.5.1996 / 16:48:20 / ca" |
|
993 |
! |
|
994 |
||
995 |
overAllPageSize |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
996 |
"the overAll pageSize in my postscript coordinate system. |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
997 |
(i.e. in twips, which is 1/20th of a point)" |
361 | 998 |
|
999 |
^ PageHeight |
|
1000 |
||
1001 |
"Created: 30.5.1996 / 16:56:51 / ca" |
|
1002 |
"Modified: 30.5.1996 / 16:58:01 / ca" |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
1003 |
"Modified: 1.6.1996 / 13:15:06 / cg" |
361 | 1004 |
! |
1005 |
||
1006 |
topMargin |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
1007 |
"return the topMargin in my postscript coordinate system. |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
1008 |
(i.e. in twips, which is 1/20th of a point)" |
361 | 1009 |
|
1010 |
^ PageHeight - TopY |
|
1011 |
||
1012 |
"Modified: 30.5.1996 / 16:58:01 / ca" |
|
1013 |
"Created: 30.5.1996 / 17:02:02 / ca" |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
1014 |
"Modified: 1.6.1996 / 13:15:50 / cg" |
361 | 1015 |
! |
1016 |
||
1017 |
topY |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
1018 |
"the top y startPosition (i.e. page-size - topMargin) in my own coordinate system |
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
1019 |
(i.e. in twips, which is 1/20th of a point)" |
361 | 1020 |
|
1021 |
^ TopY |
|
1022 |
||
1023 |
"Modified: 30.5.1996 / 16:48:48 / ca" |
|
375
ab43222a70ce
added access methods for margins
Claus Gittinger <cg@exept.de>
parents:
373
diff
changeset
|
1024 |
"Modified: 1.6.1996 / 13:15:23 / cg" |
361 | 1025 |
! ! |
1026 |
||
431 | 1027 |
!PostscriptPrinterStream class methodsFor:'documentation'! |
186
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
1028 |
|
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
1029 |
version |
431 | 1030 |
^ '$Header: /cvs/stx/stx/libbasic2/PostscriptPrinterStream.st,v 1.40 1996-09-05 13:28:15 ca Exp $' |
186
bc1b056b097c
added #supportsPostscript query
Claus Gittinger <cg@exept.de>
parents:
179
diff
changeset
|
1031 |
! ! |
126 | 1032 |
PostscriptPrinterStream initialize! |