From ec4311676bc6853bae1e67b3cc1b0c508dafce5c Mon Sep 17 00:00:00 2001 From: frese Date: Mon, 4 Feb 2002 12:45:25 +0000 Subject: [PATCH] - using a save version of gcontext-font. --- scheme/xlib/gcontext.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/scheme/xlib/gcontext.scm b/scheme/xlib/gcontext.scm index 33281b8..1eca30e 100644 --- a/scheme/xlib/gcontext.scm +++ b/scheme/xlib/gcontext.scm @@ -94,7 +94,7 @@ (make-pixel Xpixel #f #f))) ((11 12 20) (lambda (Xpixmap) (make-pixmap Xpixmap display #f))) - ((15) (lambda (Xfont) + ((14) (lambda (Xfont) ;; -> see Xlib Programming Manual 5.12 (make-font #f Xfont #f display #t))) (else (lambda (x) x)))))) @@ -118,7 +118,7 @@ (define gcontext-stipple (make-gcontext-getter (gc-value stipple))) (define gcontext-ts-x-origin (make-gcontext-getter (gc-value ts-x-origin))) (define gcontext-ts-y-origin (make-gcontext-getter (gc-value ts-y-origin))) -(define gcontext-font (make-gcontext-getter (gc-value font))) +;(define gcontext-font (make-gcontext-getter (gc-value font))) (define gcontext-subwindow-mode (make-gcontext-getter (gc-value subwindow-mode))) (define gcontext-graphics-exposures @@ -131,15 +131,15 @@ ;; Alternative definition of gcontext-font. See XGcontextFromGC ; -;(define (gcontext-font gcontext) -; (let* ((display (gcontext-display gcontext)) -; (Xfontstruct (%gcontext-font -; (display-Xdisplay display) -; (gcontext-Xgcontext gcontext)))) -; (make-font #f #f Xfontstruct display #f))) -; -;(import-lambda-definition %gcontext-font (Xdisplay Xgcontext) -; "scx_GContext_Font") ; defined in font.c +(define (gcontext-font gcontext) + (let* ((display (gcontext-display gcontext)) + (Xfontstruct (%gcontext-font + (display-Xdisplay display) + (gcontext-Xgcontext gcontext)))) + (make-font #f #f Xfontstruct display #f))) + +(import-lambda-definition %gcontext-font (Xdisplay Xgcontext) + "scx_GContext_Font") ; defined in font.c ;; change-gcontext sets some attributes of the specified graphic ;; context. The format of the arguments is like for