source: project/wiki/eggref/3/fps @ 13621

Last change on this file since 13621 was 13621, checked in by sjamaan, 11 years ago

Move old chicken 3 eggs over to eggref/3

File size: 4.5 KB
Line 
1[[tags: eggs graphics postscript]]
2
3[[toc:]]
4
5
6== fps
7
8=== Introduction
9
10FPS is a portable system for doing device-independent, resolution-independent
11graphics from Scheme programs. It is PostScript, with the Forth computational
12engine replaced with Scheme.
13
14FPS is tightly based upon PostScript. It uses *exactly* the PostScript base
15rendering primitives. For example, it understands PostScript AFM files, and
16can render text using general PostScript fonts.
17
18The design of FPS centers on two basic data structures: paths and
19pictures.  A path is an invisible, ideal geometric path on a plane. A
20picture is a description of ink on paper. Paths can be scaled,
21rotated, translated, and composed, creating new paths. Filling or
22stroking a path creates a picture. Pictures can also be scaled,
23rotated, translated, clipped, recolored, and composed, creating new
24pictures. The system is fully functional and free of side effects. The
25single side effect available to the user is rendering a picture to an
26output device. PostScript fonts are supported for generating paths and
27pictures from text.
28
29The system is not a "toy." The full set of PostScript rendering
30primitives are provided: lines, curve, arcs, glyphs, and bitmaps. Full
31control is provided of the rendering engine's style parameters, such
32as line width, and cap style. Interchangeable RGB, CMYK, and HSB color
33models are provided.
34
35The current release of FPS renders pictures to any Scheme port as a stream
36of straight-line, DSC-compliant PostScript text which can be submitted to
37any PostScript printer or viewed with ghostview. The renderer can generate
38EPS text if desired. The actual rendering is done on the printer, for
39accuracy and efficiency (the system has been carefully designed to allow
40for this phase-distinction between picture construction and rendering).
41
42The current release has at least three lacunae: we do not currently support
43PostScript patterned fills, text kerning, or huge, CID fonts (such as
44Chinese).
45
46More documentation can be found in
47[[http://www.call-with-current-continuation.org/eggs/fps-ref.txt|fps-ref.txt]]
48and
49[[http://www.call-with-current-continuation.org/eggs/fps-tutorial.txt|fps-tutorial.txt]].
50
51
52=== Usage
53
54 (require-extension fps)
55
56Since some exported procedures clash with existing library names, all global
57definitions provided by this extension have been prefixed with {{fps:}}, that is
58{{compose}} is renamed to {{fps:compose}} and {{:line-width}} becomes {{fps::line-width}}.
59The exported syntax definitions {{with-style}} and {{with-attrib}} are ''not'' prefixed.
60
61In combination with {{syntax-case}}, you can also access the exported definitions without the
62prefix by importing the {{fps}} module:
63
64 (import fps)
65
66The same can be achieved with the {{modules}} egg (note that importing {{fps}} at top-level
67still clobbers some library functions).
68
69
70=== Requirements
71
72[[http://www.call-with-current-continuation.org/eggs/syntax-case|syntax-case]] is needed for
73building this extension, but not for using it.
74
75[[records]] and [[format-modular]] are required at run-time.
76
77
78=== AFM Files
79
80The AFM files for some common fonts are included in the AFM directory, located
81in the extension repository:
82
83  Times-Roman.afm
84  Times-BoldItalic.afm
85  Courier.afm
86  Helvetica.afm
87  Symbol.afm
88
89To overrride that location, set the environment variable {{FPS_AFM_PATH}} to a colon-separated
90list of directories.
91
92
93=== Authors
94
95Wandy Sae-Tan and Olin Shivers
96
97
98=== History
99
100; 1.1 : fixed bug in lowlevel version of {{with-attrib}}
101; 1.0 : first release as an egg
102
103
104=== License
105
106FPS is copyright the authors, Wandy Sae-tan and Olin Shivers. Don't         
107worry about this too much. We advocate open use of the system and           
108provide sources in our releases. We retain copyright mostly as a means       
109of controlling the specific interface named by the term "FPS." We want       
110there to be a reliable interface spec on which programmers can depend,       
111so we are centralising control of that interface.                           
112                                                                             
113If you want to use FPS for a commercial system, send us email. There         
114should be no trouble.                                                       
115                                                                               
116If you want to extend the system, and want to fold your changes back         
117in to the shipped design, send us mail at wandy@mit.edu and                 
118shivers@ai.mit.edu.                                                       
119
120Copyright (C) 1996 Wandy Sae-Tan and Olin Shivers
Note: See TracBrowser for help on using the repository browser.