view ueda/uschem-print/uschem-procset.ps @ 42:43ba91b137e2

pads2gpcb: starting to grok decal definitions
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 11 Jan 2016 19:21:29 +0000
parents cd92449fdb51
children
line wrap: on
line source

%!PS-Adobe-3.0 Resource-ProcSet
%%LanguageLevel: 2
%%BeginResource: procset (uschem-print procedures) 1.0 0
40 dict begin
/setscale {
	/xscale printsize_x printmargin 2 mul sub drawingsize_x div def
	/yscale printsize_y printmargin 2 mul sub drawingsize_y div def
	xscale yscale ge {
		printsize_x drawingsize_x yscale mul sub 2 div
		printmargin translate
		yscale dup scale
	} {
		printsize_y drawingsize_y xscale mul sub 2 div
		printmargin exch translate
		xscale dup scale
	} ifelse
} bind def
% text stuff
/ptsize {
	textscalefactor mul
} bind def
/settextfudge {
	1000 72 div mul
	/textscalefactor exch def
} bind def
/selfnt {
	ptsize selectfont
} bind def
/selisofnt {
	exch transfont exch ptsize scalefont setfont
} bind def
3 dict begin
	/left 0 def
	/ctr {
		1 index stringwidth pop
		2 div neg
	} bind def
	/right {
		1 index stringwidth pop neg
	} bind def
currentdict end
/Tshow_halign exch def
3 dict begin
	/bottom 0 def
	/ctr {
		0 0 moveto
		1 index true charpath flattenpath pathbbox newpath
		4 1 roll pop pop pop
		2 div neg
	} bind def
	/top {
		0 0 moveto
		1 index true charpath flattenpath pathbbox newpath
		4 1 roll pop pop pop
		neg
	} bind def
currentdict end
/Tshow_valign exch def
/Tshow {	% string halign valign rot x y
	gsave translate rotate
	exch //Tshow_halign exch get exec
	exch //Tshow_valign exch get exec
	moveto show
	grestore
} bind def
% simple graphic utilities
/circlefill {
	newpath 0 360 arc closepath fill
} bind def
/circlestroke {
	newpath 0 360 arc closepath stroke
} bind def
/setsolid {
	{} 0 setdash
} bind def
% for symbols
/mirror {
	mirrored {neg} if
} bind def
/mirrortext_table <<
	/left /right
	/ctr /ctr
	/right /left
>> def
/mirrortext {
	mirrored {//mirrortext_table exch get} if
} bind def
/mirrorangle {
	dup sin exch cos neg atan
} bind def
/mirrorarc {
	mirrored {mirrorangle exch mirrorangle} if
} bind def
/drawpin {
	gsave newpath
	moveto lineto
	pinthickness setlinewidth 0 setlinecap setsolid
	stroke grestore
} bind def
% schematic stuff
/conndot {
	conndotradius circlefill
} bind def
currentdict end
/$uschem exch def
%%EndResource