🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.postscript
1 messages
1 total messages Started by Thomas Kinsman Mon, 16 Nov 1992 21:44
EXPOSURE RECORD SHEET (PHOTOGRAPHY)
#5690
Author: Thomas Kinsman
Date: Mon, 16 Nov 1992 21:44
200 lines
5819 bytes
%!PS
% This  PostScript program, while not nearly as complicated or as  interesting
% as  the  stuff  my  brother cranks out, will produce a pretty chart which is
% used to record pictures when bracketting exposures.  So, if you aren't  sure
% exactly  which  F-Stop  to use, you try several, and write them down.  It is
% also used for recording the subject of each photograph, in case  you  forget
% who  or  what  you  have taken a picture of.  (Can you find the hawk in this
% picture?...  I think it's THAT speck over there...)
%
% Any other ideas on how this could be improved?
%
%	Source code written by Thomas B. Kinsman., thomask@kodak.com
%	Purpose: 	Make table of for recording exposures and subjects.
%	Headings, as strings:
/str_head1 [ (PHOTO) (SHUTTER) (F) (SUBJECT) ] def
/str_head2 [ (No.) (SPEED) (STOP) (DESCRIPTION) ] def
/PhotosPerRoll 38 def

%	EVERYTHING FROM HERE DOWN SHOULD BE AUTOMATIC
%
%	Procedure to convert points to inches.
%
/inch { 72 mul } def
%
%	Global settings:
%
%/FontName	/Helvetica	def % font name for procedure names.
%/FontName	/Helvetica-Bold def % font name for procedure names.
/FontName	/Times-Bold	def % font name for procedure names.
/SmFontSize     12	 	def % size for tape description.
/FontSize	18		def % size used for FontName.
/Leading	 2	    	def % space between lines.

/ResetFont { FontName findfont FontSize scalefont setfont } def
/SetFontSize { /FontSize exch def ResetFont } def
/SideMargin	0.375 inch def		% space bet. left and text.
/LM		SideMargin def		% space from left edge to start of text.
/RM  8.5 inch SideMargin sub def	% RIGHT MARGIN
/TM 10.5 inch def			% TOP MARGIN
/BM  0.5 inch def


%
%	Procedure to go to next line.
%
/nl					% Newline
{
    currentpoint exch pop		% Get current height from
					% bottom of page.
    FontSize Leading add sub		% compute next line height.
    LM exch			% SideMargin will be X location.
    moveto
} def


% upline
/ul					% Used when printing stack	
{
    currentpoint exch pop		% Get current height from
					% bottom of page.
    FontSize Leading add add		% compute next line height.
    LM  exch			% LeftSize will be X location.
    moveto
} def


/num_headings str_head1 length def
/heading_widths num_headings array def
/heading_starts num_headings 1 add array def


/set_widths
{
    0 1 num_headings 1 sub		% set all widths of columns
    {
	dup dup				%stack: index index index
	str_head1 exch get		%stack: index index str_head1[index]

	stringwidth pop (   ) stringwidth pop add	%stack: index index width1

	exch 				%stack: index width1 index
	str_head2 exch get		%stack: index width1 str_head2[index]
	stringwidth pop (   ) stringwidth pop add	%stack:	index width1 width2

%	ul
%	(stack_check ) show ul
%	(w2 =  ) show 20 string cvs show ul			% debugging
%	(w1 =  ) show 20 string cvs show ul			% debugging
%
	dup				%stack:	index width1 width2 width2
	3 -1 roll			%stack: index width2 width2 width1
	dup				%stack: index width2 width2 width1 width1

	3 1 roll			%stack: index width2 width1 width2 width1

	lt
	{
	    exch
	} if				%stack: index maxwidth minwidth
	pop				%stack: index maxwidth

	heading_widths			%stack: index maxwidth array
	3 1 roll			%stack: array index  maxwidth
	put
    } for

    /totalwidth LM def
    0 1 num_headings 1 sub			% set all widths of columns
    {
	dup 					%stack: index index

	heading_starts exch totalwidth put	%stack: index
	heading_widths exch get			%stack: heading_widths[index]
	totalwidth add /totalwidth exch def
    } for
    heading_starts num_headings totalwidth put	%last starting row location.

} def


/show_heading
{
/head_array exch def

    0 1 num_headings 1 sub
    {
	dup heading_starts exch get	%stack:	index heading_starts[index]
	currentpoint exch pop moveto
	head_array exch get show
    } for
} def


/show_columns
{
    currentpoint
    newpath
    0 1 num_headings 1 sub
    {
	heading_starts exch get	( ) stringwidth pop sub dup
	TM moveto
	BM lineto
    } for
    RM TM moveto
    RM BM lineto
    stroke
    moveto
} def

/show_rows
{
/Currenty	currentpoint exch pop def
/LineHeight	Currenty BM sub PhotosPerRoll 1 sub div def
/LeftSide	heading_starts 0 get ( ) stringwidth pop sub def
/RightSide	RM def

    % First line first...
    newpath
    LeftSide Currenty LineHeight add moveto
    RightSide Currenty LineHeight add lineto
    % Top Line
    LeftSide TM moveto
    RightSide TM lineto
    stroke

    1 1 PhotosPerRoll
    {
	newpath
	LeftSide Currenty moveto
	RightSide Currenty lineto
	stroke
	
	10 string cvs			%stack: (frame_number)
	heading_starts 0 get Currenty Leading add moveto
	show

	Currenty LineHeight sub /Currenty exch def
    } for
} def


erasepage
ResetFont
set_widths

LM TM moveto nl
str_head1 show_heading nl
str_head2 show_heading nl
show_columns
show_rows

/Helvetica-Bold findfont 8 scalefont setfont
/AuthorString (11/16/92  T. B. Kinsman) def
RM AuthorString stringwidth pop sub BM 12 sub moveto
AuthorString show

showpage
--
thomas@acadia.kodak.com    Voice: 716/477-2831(w)	     Fax: 716/722-0160
Thomas B. Kinsman, Eastman Kodak Co., Flr 3, Bldg 65, RL, Roch., NY 14650-1816
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads