|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 2271 (0x8df) Types: TextFile Names: »rules.psr«
└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12 └─⟦af5ba6c8e⟧ »unix3.0/DVIWARE.tar.Z« └─⟦ca79c7339⟧ └─⟦this⟧ »DVIware/laser-setters/dvi-to-ps/TeXPS/dvitps/psr/rules.psr«
% Copyright (c) 1988 Stephan v. Bechtolsheim % This file is part of the TeXPS Software Package. % The TeXPS Software Package is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY. No author or distributor % accepts responsibility to anyone for the consequences of using it % or for whether it serves any particular purpose or works at all, % unless he says so in writing. Refer to the TeXPS Software Package % General Public License for full details. % Everyone is granted permission to copy, modify and redistribute % the TeXPS Software Package, but only under the conditions described in the % TeXPS Software Package General Public License. A copy of this license is % supposed to have been given to you along with TeXPS Software Package so you % can know your rights and responsibilities. It should be in a % file named CopyrightLong. Among other things, the copyright notice % and this notice must be preserved on all copies. % Here are two definitions for rounding rules. % 1. The SECOND definition is the one I originally used, and it worked. % 2. Then somebody pointed out the FIRST definition, which I looked % at as a clear solution rather than a cludge. % 3. Too bad: I found out that the FIRST solution does not work although % it should. Therefore we are back to the second solution. % % x-width y-height z - % Draw rule of given dimensions at current point. % Do NOT move reference point. % % FIRST SOLUTION % =============== /z { /dy exch def /dx exch def % (start rule\n) print flush currentpoint currentpoint % Unrounded current point transform round exch round exch itransform % Replaced by rounded current point. newpath moveto dx 0 rlineto 0 dy rlineto dx neg 0 rlineto closepath fill moveto % (end rule\n) print flush } def % SECOND SOLUTION % =============== /z { /dy exch def /dx exch def % (start rule\n) print flush currentpoint % (1) unrounded current point. 0.2 0.2 rmoveto % Seems to make the PostScript % interpreter to round consistently. currentpoint % (2) Save current point. newpath moveto % (2) dx 0 rlineto 0 dy rlineto dx neg 0 rlineto closepath fill moveto % (1) % (end rule\n) print flush } def