⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cycle.ps

📁 Spim软件的一些源码。其中有Xspim的
💻 PS
📖 第 1 页 / 共 5 页
字号:
/DefinePXLFont {
  /newfont xdef
  /bb xdef
  /num xdef
  /psz xdef
  /dsz xdef
  /pxlmag xdef
  /ext xdef
  /int xdef
 
  /fnam ext (-) str-concat pxlmag tempstr cvs str-concat def
 
  newfont not {
    int-dict-name 13 dict def
   
    int-dict begin
      /FontType 3 def
      /FontMatrix [1 dsz div 0 0 1 dsz div 0 0] def
      /FontBBox bb TransformBBox def
      /Encoding CMEncodingArray def
      /CharDict 1 dict def
      CharDict begin
        /Char-Info num array def
        end
  
      /BuildChar
        { 
          PXLBuildCharDict begin
            /char xdef
            /fontdict xdef
   
            fontdict /CharDict get /Char-Info get char get aload pop
   
            /rasters xdef
            /PackedWord1 xdef
   
            0 PackedWord1 UnpkHW 16#7FFF ne
              { /PackedWord2 xdef
                /wx 0 PackedWord1 UnpkHW def
                /rows 2 PackedWord1 UnpkByte def
                /cols 3 PackedWord1 UnpkByte def
                /llx 0 PackedWord2 UnpkByte def
                /lly 1 PackedWord2 UnpkByte def
                /urx 2 PackedWord2 UnpkByte def
                /ury 3 PackedWord2 UnpkByte def }
              { /PackedWord2 xdef
                /PackedWord3 xdef
                /PackedWord4 xdef
                /wx 1 PackedWord1 UnpkHW def
                /rows 0 PackedWord2 UnpkHW def
                /cols 1 PackedWord2 UnpkHW def
                /llx 0 PackedWord3 UnpkHW def
                /lly 1 PackedWord3 UnpkHW def
                /urx 0 PackedWord4 UnpkHW def
                /ury 1 PackedWord4 UnpkHW def }
               ifelse

            rows 0 lt
              { /rows rows neg def
                /runlength 1 def }
              { /runlength 0 def }
             ifelse
 
            wx 0 
            llx RasterConvert lly RasterConvert 
            urx RasterConvert ury RasterConvert setcachedevice
            rows 0 ne
              {
              gsave
                cols rows true 
		RasterScaleFactor 0 0 RasterScaleFactor neg llx neg .5 add ury .5 add

                  tempmatrix astore
                {GenerateRasters} imagemask
              grestore
              } if
            end
        } def
      end
   
      fnam int-dict definefont pop 
    } if 
 
  int-dict-name fnam findfont psz scalefont def
  currentdict int [int-dict /setfont cvx] cvx put
} bdef 
 
%
%  <int-font-name> <code> <wx> <llx> <lly> <urx> <ury> <rows> <cols> <runlength> <rasters> PXLC
%
/PXLC {
 
  /rasters xdef
  /runlength xdef
  /cols xdef
  /rows xdef
  /ury xdef
  /urx xdef
  /lly xdef
  /llx xdef
  /wx xdef
  /code xdef
  /int xdef
 
  % See if the long or short format is required
  true cols CKSZ rows CKSZ ury CKSZ urx CKSZ lly CKSZ llx CKSZ 
    TackRunLengthToRows
    { int-dict /CharDict get /Char-Info get code 
        [0 0 llx PackByte 1 lly PackByte 2 urx PackByte 3 ury PackByte
         0 0 wx PackHW 2 rows PackByte 3 cols PackByte
         rasters] put}
    { int-dict /CharDict get /Char-Info get code 
        [0 0 urx PackHW 1 ury PackHW
         0 0 llx PackHW 1 lly PackHW
         0 0 rows PackHW 1 cols PackHW
         0 0 16#7FFF PackHW 1 wx PackHW
         rasters] put} 
    ifelse
} bdef
 
/CKSZ {abs 127 le and} bdef
/TackRunLengthToRows {runlength 0 ne {/rows rows neg def} if} bdef
 
%
%  <wx> <dsz> <psz> <llx> <lly> <urx> <ury> <rows> <cols> <runlength> <rasters> PLOTC
%
/PLOTC {
  /rasters xdef
  /runlength xdef
  /cols xdef
  /rows xdef
  /ury xdef
  /urx xdef
  /lly xdef
  /llx xdef
  /psz xdef
  /dsz xdef
  /wx xdef
 
  % "Plot" a character's raster pattern.
  rows 0 ne
    {
    gsave
      currentpoint translate
      psz dsz div dup scale
      cols rows true 
      RasterScaleFactor 0 0 RasterScaleFactor neg llx neg ury 
        tempmatrix astore
      {GenerateRasters} imagemask
    grestore
    } if
  wx x
} bdef
 
% Routine to generate rasters for "imagemask".
/GenerateRasters {
  rasters
  runlength 1 eq {RunLengthToRasters} if
} bdef
 
% Routine to convert from runlength encoding back to rasters.
/RunLengthToRasters {
  % ...not done yet...
} bdef
 
%
%  These procedures handle bitmap processing.
%
%  <bitmap columns> <bitmap rows> <bitmap pix/inch> <magnification> BMbeg
%
/BMbeg {
  /BMmagnification xdef
  /BMresolution xdef
  /BMrows xdef
  /BMcols xdef

  /BMcurrentrow 0 def
  gsave
    0.0 setgray
    Resolution BMresolution div dup scale
    currentpoint translate
    BMmagnification 1000.0 div dup scale
    0.0 BMrows moveto
    BMrows dup scale
    currentpoint translate
    /BMCheckpoint save def
  } bdef

/BMend {
  BMCheckpoint restore
  grestore
  } bdef

%
%  <hex raster bitmap> <rows> BMswath 
%
/BMswath {
  /rows xdef
  /rasters xdef

  BMcols rows true
  [BMrows 0 0 BMrows neg 0 BMcurrentrow neg]
  {rasters}
  imagemask

  /BMcurrentrow BMcurrentrow rows add def
  BMcurrentrow % save this on the stack around a restore...
  BMCheckpoint restore
  /BMcurrentrow xdef
  /BMCheckpoint save def
  } bdef

%
%  Procedures for implementing the "rotate <theta>" special:
%  <theta> ROTB -
%        - ROTE -

/ROTB {
  XP
  gsave
  Xpos Ypos translate
  rotate % using <theta> from the stack
  Xpos neg Ypos neg translate
  RP
  } bdef

/ROTE {XP grestore RP} bdef

%
%  Procedures for implementing the "epsfile <filename> [<mag>]" special:
%  <llx> <lly> <mag> EPSB -
%  - EPSE -

/EPSB {
  0 SPB
  save
  4 1 roll % push the savelevel below the parameters
  /showpage {} def
  Xpos Ypos translate
  1000 div dup scale % using <mag> from the stack
  neg exch neg exch translate % using <llx> <lly> from the stack
  } bdef

/EPSE {restore 0 SPE} bdef

%
%  Procedure for implementing revision bars:
%  <bary1> <bary2> <barx> <barw> REVB -
%  The bar is a line of width barw drawn from (barx,bary1) to (barx,bary2).

/REVB {
  /barw xdef
  /barx xdef
  /bary2 xdef
  /bary1 xdef
  gsave
    barw setlinewidth
    barx bary1 Yadjust moveto
    barx bary2 Yadjust lineto
    stroke
  grestore
  } bdef

%  
%  A small array and two procedures to facilitate The Publisher's
%  implementation of gray table cells:
%                               <ptnum> GRSP -
%  <ultpnum> <lrptnum> <graylev> <freq> GRFB -
%  
%  GRSP saves the current DVI location so that it can be retrieved later
%  by the index <ptnum>.  GRFB fills a box whose corners are given by the
%  indexes <ultpnum> and <lrptnum> with a halftone gray with the given
%  level and frequency.  The array GRPM holds the coordinates of points
%  marking the corners of gray table cells. <freq> is currently ignored
%  since modifying it via setscreen is prohibited by Adobe's PostScript
%  coding conventions.
%  

/GRPM 40 dict def

/GRSP {GRPM exch [Xpos Ypos] put} bdef

/GRFB {
  /GRfreq xdef
  /GRgraylev xdef
  GRPM exch get aload pop /GRlry xdef /GRlrx xdef
  GRPM exch get aload pop /GRuly xdef /GRulx xdef
  gsave
    % % set the screen frequency if it isn't zero
    % % (disabled currently...)
    % GRfreq 0 ne
    %   {currentscreen
    %   3 -1 roll pop GRfreq 3 1 roll
    %   setscreen}
    % if
    % set the gray level
    GRgraylev setgray
    % draw and fill the path
    GRulx GRuly moveto
    GRlrx GRuly lineto
    GRlrx GRlry lineto
    GRulx GRlry lineto
    closepath
    fill
  grestore
  } bdef


%
%  Procedures for implementing the "paper <source>" option:
%  <name> <eop> SPS          -
%         <eop> paper-manual -
%  etc.  The boolean <eop> is passed so that a paper source procedure
%  knows if it is being called at the beginning (false) or end
%  (true) of a page.

/SPS {
  /eop xdef
  /name xdef
  name where {pop eop name cvx exec} if
  } bdef

/paper-manual {
    {statusdict /manualfeed known
      {statusdict /manualfeed true put}
    if}
  if
  } bdef

/paper-automatic {
    {statusdict /manualfeed known
      {statusdict /manualfeed false put}
    if}
  if
  } bdef

/paper-top-tray {
    {}
    {statusdict /setpapertray known
      {statusdict begin gsave 0 setpapertray grestore end}
    if}
  ifelse
  } bdef

/paper-bottom-tray {
    {}
    {statusdict /setpapertray known
      {statusdict begin gsave 1 setpapertray grestore end}
    if}
  ifelse
  } bdef

/paper-both-trays {
    {}
    {statusdict /setpapertray known
      {statusdict begin gsave 2 setpapertray grestore end}
    if}
  ifelse
  } bdef

/clipping_path {
    /x1 xdef
    /y1 xdef
    /x2 xdef
    /y2 xdef
    newpath
    x1 y1 moveto
    x2 y1 lineto
    x2 y2 lineto
    x1 y2 lineto
    closepath
  }bdef


(end of common prolog) VMSDebug 

end
 
systemdict /setpacking known 
  {savepackingmode setpacking}
  if

%!
% Psfig/TeX Release 1.2
% dvips version
%
% All software, documentation, and related files in this distribution of
% psfig/tex are Copyright 1987, 1988 Trevor J. Darrell
%
% Permission is granted for use and non-profit distribution of psfig/tex 
% providing that this notice be clearly maintained, but the right to
% distribute any portion of psfig/tex for profit or as part of any commercial
% product is specifically reserved for the author.
%
%
% $Header: figtex.pro,v 1.5 87/07/24 20:14:50 trevor Exp $
% $Source: $
%
/TeXscale { 65536 div } def

/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap
currentlinejoin currentdash currentgray currentmiterlimit ] cvx def

/startTexFig {
% usage :  x y bb-llx bb-lly bb-urx bb-ury startFig
	/SavedState save def
	userdict maxlength dict begin
	currentpoint transform

	DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap
		setlinewidth setmatrix

	$DviLaser /PortraitMode known {
		$DviLaser /PortraitMode get not { 90 rotate } if } if

	itransform moveto

	/ury exch TeXscale def
	/urx exch TeXscale def
	/lly exch TeXscale def
	/llx exch TeXscale def
	/y exch TeXscale def
	/x exch TeXscale def
	
	currentpoint /cy exch def /cx exch def

	/sx x urx llx sub div def 	% scaling for x
	/sy y ury lly sub div def	% scaling for y

	sx sy scale			% scale by (sx,sy)

	cx sx div llx sub
	cy sy div ury sub translate
	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -