#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.128 1991/11/26 07:07:00 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.129 1991/12/19 20:50:17 arthur Exp $
Copyright (c) 1988-91 Massachusetts Institute of Technology
x-image/set-pixel
x-image/width
x-image?
- x-open-display)
+ x-open-display
+ x-font-structure/name
+ x-font-structure/direction
+ x-font-structure/all-chars-exist
+ x-font-structure/default-char
+ x-font-structure/min-bounds
+ x-font-structure/max-bounds
+ x-font-structure/start-index
+ x-font-structure/character-bounds
+ x-font-structure/max-ascent
+ x-font-structure/max-descent
+ x-character-bounds/lbearing
+ x-character-bounds/rbearing
+ x-character-bounds/width
+ x-character-bounds/ascent
+ x-character-bounds/descent)
(initialization (initialize-package!)))
(define-package (runtime starbase-graphics)
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/x11graph.scm,v 1.10 1991/07/23 08:19:26 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/x11graph.scm,v 1.11 1991/12/19 20:49:59 arthur Exp $
Copyright (c) 1989-91 Massachusetts Institute of Technology
(x-display-flush 1)
(x-display-get-default 3)
(x-display-process-events 2)
+ (x-font-structure 2)
(x-window-x-size 1)
(x-window-y-size 1)
(x-window-map 1)
(x-graphics-draw-line 5)
(x-graphics-draw-point 3)
(x-graphics-draw-string 4)
+ (x-graphics-copy-area 7)
(x-graphics-set-function 2)
(x-graphics-set-fill-style 2)
(x-graphics-set-line-style 2)
(clear ,operation/clear)
(close ,operation/close)
(coordinate-limits ,operation/coordinate-limits)
+ (copy-area ,operation/copy-area)
(create-colormap ,operation/create-colormap)
(create-image ,operation/create-image)
(device-coordinate-limits ,operation/device-coordinate-limits)
(draw-point ,operation/draw-point)
(draw-text ,operation/draw-text)
(flush ,operation/flush)
+ (font-structure ,operation/font-structure)
(get-colormap ,operation/get-colormap)
(get-default ,operation/get-default)
(map-window ,operation/map-window)
(vector-ref limits 2)
(vector-ref limits 3))))
+(define (operation/copy-area device
+ source-x-left source-y-top
+ width height
+ destination-x-left destination-y-top)
+ (x-graphics-device/process-events! device)
+ (x-graphics-copy-area (x-graphics-device/window device)
+ source-x-left source-y-top
+ width height
+ destination-x-left destination-y-top))
+
(define (operation/device-coordinate-limits device)
(x-graphics-device/process-events! device)
(let ((xw (x-graphics-device/window device)))
(x-display-flush (x-graphics-device/display device))
(x-graphics-device/process-events! device))
+(define (operation/font-structure device string)
+ (x-graphics-device/process-events! device)
+ (x-font-structure (x-graphics-device/display device) string))
+
(define (operation/get-default device resource-name class-name)
(x-graphics-device/process-events! device)
(x-display-get-default (x-graphics-device/display device)
(x-store-color (colormap/descriptor colormap) position r g b))
(define (x-colormap/store-colors colormap color-vector)
- (x-store-colors (colormap/descriptor colormap) color-vector))
\ No newline at end of file
+ (x-store-colors (colormap/descriptor colormap) color-vector))
+\f
+;;;; Fonts
+
+(define-structure (x-font-structure (conc-name font-structure/)
+ (type vector))
+ (name false read-only true)
+ (direction false read-only true)
+ (all-chars-exist? false read-only true)
+ (default-char false read-only true)
+ (min-bounds false read-only true)
+ (max-bounds false read-only true)
+ (start-index false read-only true)
+ (character-bounds false read-only true)
+ (max-ascent false read-only true)
+ (max-descent false read-only true))
+
+(define-structure (x-character-bounds (conc-name character-bounds/)
+ (type vector))
+ (lbearing false read-only true)
+ (rbearing false read-only true)
+ (width false read-only true)
+ (ascent false read-only true)
+ (descent false read-only true))
\ No newline at end of file
#| -*-Scheme-*-
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.128 1991/11/26 07:07:00 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.129 1991/12/19 20:50:17 arthur Exp $
Copyright (c) 1988-91 Massachusetts Institute of Technology
x-image/set-pixel
x-image/width
x-image?
- x-open-display)
+ x-open-display
+ x-font-structure/name
+ x-font-structure/direction
+ x-font-structure/all-chars-exist
+ x-font-structure/default-char
+ x-font-structure/min-bounds
+ x-font-structure/max-bounds
+ x-font-structure/start-index
+ x-font-structure/character-bounds
+ x-font-structure/max-ascent
+ x-font-structure/max-descent
+ x-character-bounds/lbearing
+ x-character-bounds/rbearing
+ x-character-bounds/width
+ x-character-bounds/ascent
+ x-character-bounds/descent)
(initialization (initialize-package!)))
(define-package (runtime starbase-graphics)