; ; plumbing.scm -- Lance R. Williams, Aug. 16, 2003. ; ; Copyright 2003 University of New Mexico. ; All rights reserved. ; ; Permission to copy and modify this software and its documen- ; tation only for internal use in your organization is hereby ; granted, provided that this notice is retained thereon and ; on all copies. UNM makes no representations as to the sui- ; tability and operability of this software for any purpose. ; It is provided "as is" without express or implied warranty. ; ; UNM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, ; INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT- ; NESS. IN NO EVENT SHALL UNM BE LIABLE FOR ANY SPECIAL, ; INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHAT- ; SOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER ; IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ; ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PER- ; FORMANCE OF THIS SOFTWARE. ; ; No other rights, including, for example, the right to redis- ; tribute this software and its documentation or the right to ; prepare derivative works, are granted unless specifically ; provided in a separate license agreement. ; ; Copyright 2003, University of New Mexico. All rights ; reserved. ;; connect (define adjoin (lambda args (if (null? args) scheme:graphic-null (scheme:adjoin (car args) (apply adjoin (cdr args)))))) ;; attach (define adorn (lambda args (if (null? args) scheme:graphic-null (scheme:adorn (car args) (apply adorn (cdr args)))))) (define straight (lambda (len . args) (if (null? args) (scheme:straight len) (if (null? (cdr args)) (scheme:fancy-straight len (car args) 1.0) (scheme:fancy-straight len (car args) (cadr args)))))) (define spot (lambda (width . args) (if (null? args) (scheme:spot width) (scheme:fancy-spot width (car args))))) (define text (lambda (x . args) (let* ((convert (lambda (x) (cond ((number? x) (number->string x)) ((symbol? x) (symbol->string x)) (else x)))) (txt (convert x))) (if (null? args) (scheme:text txt) (if (null? (cdr args)) (scheme:fancy-text txt (car args) 1.0) (scheme:fancy-text txt (car args) (cadr args))))))) (define gscale (lambda (g lscale . args) (if (null? args) (scheme:gscale g lscale 1.0) (scheme:gscale g lscale (car args))))) (define st straight) (define sp spot) (define be bend) (define adj adjoin) (define ado adorn) (define tr transparent) (define txt text) (define gc gcolor) (define gs gscale) (define gm gmirror) (define gr greverse) (define white scheme:graphic-white) (define black scheme:graphic-black) (define red scheme:graphic-red) (define green scheme:graphic-green) (define blue scheme:graphic-blue) (define orange scheme:graphic-orange) ;; For backwards compatibility (define graphic-color gcolor) (define graphic-scale gscale) (define graphic-mirror gmirror) (define graphic-reverse greverse)