DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T e

⟦0b3305504⟧ TextFile

    Length: 2486 (0x9b6)
    Types: TextFile
    Names: »ellipse.psr«

Derivation

└─⟦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/ellipse.psr« 

TextFile

% 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.

% This code is needed by tpic.
/@ellipsedict 10 dict def

% Need some type of matrix (it's used by currentmatrix below).
@ellipsedict /mtrx matrix put

% Arguments of the following call (note: angles are in degrees.)
% The shading parameter is to be interpreted as follows:
% If the value is positive, it is assumed to be in the range 0 .. 1 and its value is used for
%     setgray in the following fill operation.
% If the value is negative, no shading takes place
%
% The draw-arc parameter is true or false to specify whether an arc
%    should be drawn or not.
%
% x-center y-center x-radius y-radius start-angle end-angle
%           shading draw-arc @ellipse -
/@ellipse
{ 
    @ellipsedict begin
% Save all the arguments.
    /draw-arc exch def
    /shading-argument exch def
    /endangle exch def
    /startangle exch def
    /yrad exch def
    /xrad exch def
    /y exch def
    /x exch def
% Save the current matrix.
    /savedmatrix mtrx currentmatrix def
% Change the coordinate system.
    x y translate
    xrad yrad scale
% Establish the arc.
    0 0 1 startangle endangle arc
% If drawing is requested do so now. Save the path, because
% shading may be requested too.
    draw-arc
    {
	gsave
	currentlinewidth xrad div setlinewidth
	stroke
	grestore
    } if
% If shading is requested it's time to do it now.
    shading-argument 0 gt
    {
	currentgray
        shading-argument setgray
        fill
	setgray
    } if
% Restore the coordinate system.
    newpath
    savedmatrix setmatrix
    end
} def