Codebase list ruby-fxruby / master test / blankpage.ps
master

Tree @master (Download .tar.gz)

blankpage.ps @masterraw · history · blame

%!PS-Adobe-3.0
%%Title: Print Job
%%Creator: FOX GUI Toolkit Application
%%BoundingBox: 72 72 540 720
%%Pages: (atend)
%%DocumentFonts:
%%EndComments
%%BeginProlog


% h w x y drawRect
/drawRect {
	newpath moveto dup 0 rlineto exch dup 0 exch
	rlineto exch neg 0 rlineto neg 0 exch rlineto
	closepath stroke
} def
% h w x y fillRect
/fillRect {
	newpath moveto dup 0 rlineto exch dup 0 exch
	rlineto exch neg 0 rlineto neg 0 exch rlineto
	closepath fill stroke
} def
% x y a b drawLine
/drawLine {
	newpath moveto lineto stroke
} def
% x y ..... npoints drawLines
/drawLines {
	3 1 roll newpath moveto {lineto} repeat stroke
} def
% x y a b ..... nsegments drawSegmt
/drawSegmt {
	newpath {
		moveto lineto
	} repeat stroke
} def
% x y drawPoint
/drawPoint {
	translate 1 1 scale 8 8 1 [ 8 0 0 8 0 0 ] {<0000>} image
} def
% centerx centery  startAngle endAngle radiusX radiusY drawArc
/drawArc {
	gsave dup 3 1 roll div dup 1 scale 6 -1 roll
	exch div 5 1 roll  3 -2 roll arc stroke grestore
} def
% (string) x y height drawText
/drawText {
	gsave findfont exch scalefont setfont moveto
	show grestore
} def
/bwproc
 {  rgbproc
    dup length 3 idiv string 0 3 0
    5 -1 roll
    { add 2 1 roll 1 sub dup 0 eq
      { pop 3 idiv 3 -1 roll dup 4 -1 roll dup
        3 1 roll 5 -1 roll put 1 add 3 0 }
      { 2 1 roll } ifelse
    } forall
    pop pop pop
} def
systemdict /colorimage known not
 { /colorimage
     { pop pop /rgbproc exch def
     { bwproc } image
 } def
} if
% Color -  r g b C
/C { setrgbcolor } bind def
% Point -  x y r g b P
/P { C newpath 0.5 0.0 360.0 arc closepath fill } bind def
% Flat Shaded Line -  x2 y2 x1 y1 r g b L
/L { C newpath moveto lineto stroke } bind def
% Smooth-shaded line -  x2 y2 r2 g2 b2 x1 y1 r1 g1 b1 SL
/SL {
 /b1 exch def
 /g1 exch def
 /r1 exch def
 /y1 exch def
 /x1 exch def
 /b2 exch def
 /g2 exch def
 /r2 exch def
 /y2 exch def
 /x2 exch def

 b2 b1 sub abs 0.01 gt
 g2 g1 sub abs 0.005 gt
 r2 r1 sub abs 0.008 gt
     or or {
         /bm b1 b2 add 0.5 mul def
         /gm g1 g2 add 0.5 mul def
         /rm r1 r2 add 0.5 mul def
         /ym y1 y2 add 0.5 mul def
         /xm x1 x2 add 0.5 mul def

         x1 y1 r1 g1 b1 xm ym rm gm bm SL
         xm ym rm gm bm x2 y2 r2 g2 b2 SL
 } {
         x1 y1 x2 y2 r1 g1 b1 L
 } ifelse
} bind def
% Flat-shaded triangle - x3 y3 x2 y2 x1 y1 r g b T
/T { C newpath moveto lineto lineto closepath fill } bind def
% Smooth-shaded triangle - x3 y3 r3 g3 b3 x2 y2 r2 g2 b2 x1 y1 r1 g1 b1 ST
/ST {
 /b1 exch def
 /g1 exch def
 /r1 exch def
 /y1 exch def
 /x1 exch def
 /b2 exch def
 /g2 exch def
 /r2 exch def
 /y2 exch def
 /x2 exch def
 /b3 exch def
 /g3 exch def
 /r3 exch def
 /y3 exch def
 /x3 exch def

 b2 b1 sub abs 0.05 gt
 g2 g1 sub abs 0.017 gt
 r2 r1 sub abs 0.032 gt
 b3 b1 sub abs 0.05 gt
 g3 g1 sub abs 0.017 gt
 r3 r1 sub abs 0.032 gt
 b2 b3 sub abs 0.05 gt
 g2 g3 sub abs 0.017 gt
 r2 r3 sub abs 0.032 gt
 or or or or or or or or {
         /b12 b1 b2 add 0.5 mul def
         /g12 g1 g2 add 0.5 mul def
         /r12 r1 r2 add 0.5 mul def
         /y12 y1 y2 add 0.5 mul def
         /x12 x1 x2 add 0.5 mul def

         /b13 b1 b3 add 0.5 mul def
         /g13 g1 g3 add 0.5 mul def
         /r13 r1 r3 add 0.5 mul def
         /y13 y1 y3 add 0.5 mul def
         /x13 x1 x3 add 0.5 mul def

         /b32 b3 b2 add 0.5 mul def
         /g32 g3 g2 add 0.5 mul def
         /r32 r3 r2 add 0.5 mul def
         /y32 y3 y2 add 0.5 mul def
         /x32 x3 x2 add 0.5 mul def

         x1 y1 r1 g1 b1 x12 y12 r12 g12 b12 x13 y13 r13 g13 b13
         x2 y2 r2 g2 b2 x12 y12 r12 g12 b12 x32 y32 r32 g32 b32
         x3 y3 r3 g3 b3 x32 y32 r32 g32 b32 x13 y13 r13 g13 b13
         x32 y32 r32 g32 b32 x12 y12 r12 g12 b12 x13 y13 r13 g13 b13
         ST ST ST ST
 } {
         x1 y1 x2 y2 x3 y3 r1 g1 b1 T
 } ifelse
} bind def
%%EndProlog
%%BeginSetup
/#copies 1 def
%%EndSetup
%%Trailer
%%Pages: 0
%%EOF