This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
On 981024, Russell McManus wrote: > I think guile-scsh has already implemented the stuff that you need. > If it's not in there, it's a bug, please send me a bug report. Well, that took all the challenge out of it. I'm sure this can be done more beautifully, but this seems to work. Index: fps-tutorial.txt =================================================================== RCS file: /home/jtl/cvsroot/fps/fps-tutorial.txt,v retrieving revision 1.1.1.1 diff -u -p -u -r1.1.1.1 fps-tutorial.txt --- fps-tutorial.txt 1998/10/23 05:59:02 1.1.1.1 +++ fps-tutorial.txt 1998/10/25 06:25:19 @@ -70,7 +70,7 @@ Here's a simple triangular path: Now we make a picture by stroking, or painting along the path: - (define triangle-picture (stroke triangle)) + (define triangle-picture (stroke triangle-path)) Every path and picture has a starting point, and ending point, and bounding box. @@ -155,7 +155,7 @@ the examples and call show or show-w/ps2 You can scale, rotate, and move your paths and pictures. - (define translate-triangle-picture + (define translated-triangle-picture (translate 100 100 triangle-picture)) The effects of transforming a path v.s. that of transforming a picture @@ -299,8 +299,8 @@ other modes. In the following example we Once we have created these colors, we can use them to specify how paths are painted to make pictures. - (stroke triangle-path (:color just-red))) - (fill triangle-path (:color less-bright-red))) + (stroke triangle-path (:color red)) + (fill triangle-path (:color less-bright-red)) You can do lots of neat color tricks in FPS because it is so easy to build new colors from exisiting ones. See the sun program in Index: fps.afm.scm =================================================================== RCS file: /home/jtl/cvsroot/fps/fps.afm.scm,v retrieving revision 1.1.1.1 diff -u -p -u -r1.1.1.1 fps.afm.scm --- fps.afm.scm 1998/10/23 05:59:01 1.1.1.1 +++ fps.afm.scm 1998/10/25 06:12:34 @@ -9,13 +9,12 @@ ;; ====================================================================== - ;; AFM-TABLE is a hash table that uses fontnames (strings) as ;; keys. Each key points to a afm record -(define afm-table (make-string-table)) -(define (afm-table-ref fontname) (table-ref afm-table fontname)) -(define (afm-table-set! fontname entry) (table-set! afm-table - fontname entry)) +(define afm-table (make-vector 23)) ; XXX arbitrary size; good? +(define (afm-table-ref fontname) (hash-ref afm-table fontname)) +(define (afm-table-set! fontname entry) (hash-set! afm-table + fontname entry)) ;; AFM records contains the data that can be extracted from each afm ;; file. These records are entries in the afm-table @@ -30,9 +29,9 @@ ;; GLYPH-TABLE is a hash table that uses glyphnames (strings) as ;; keys. Each key points to a glyph record. There is one glyph-table ;; for every afm file loaded. -(define make-glyph-table make-string-table) -(define glyph-table-set! table-set!) -(define glyph-table-ref table-ref) +(define make-glyph-table (lambda () (make-vector 23))) +(define glyph-table-set! hash-set!) +(define glyph-table-ref hash-ref) ;; GLYPH record is a record for the afm data of each glyph. These Index: init.scm =================================================================== RCS file: init.scm diff -N init.scm --- /dev/null Tue May 5 13:32:27 1998 +++ init.scm Sat Oct 24 23:10:32 1998 @@ -0,0 +1,22 @@ +(load-from-path "scsh/init") +(map (lambda (name) (load-from-path (string-append "fps/" name))) + '("let-opt" + "defrec" + "conditionals" + "fps.type" + "fps.color" + "fps.util" + "fps" + "fps.glyph" + "fps.comp" + "fps.paint" + "fps.map" + "fps.afm" + "fps.ask" + "fps.show" + "fps.mat" + "fps.style" + "fps.bitmap" + "fps.options" + "ps.path" + "ps.misc"))