Hi,
I was looking at the CLIM spec and noticed that draw-text* exposes the possibility of changing the direction of the text drawn (e.g., having the text go right-to-left or top-to-bottom), but I don't seem to be able to get it to work in McCLIM (latest CVS running with CLX against the Mac OS X X11.app system). In detail, I tried the following code (modified slightly from the "hello world" example from the "Guided Tour" paper:
------------------------------------------------------------------------ (define-application-frame hello-world () ((greeting :initform "Hello World" :accessor greeting)) (:pane (make-pane 'hello-world-pane)))
(defclass hello-world-pane (clim-stream-pane) ())
(defmethod handle-repaint ((pane hello-world-pane) region) (let ((w (bounding-rectangle-width pane)) (h (bounding-rectangle-height pane))) ;; Blank the pane out (draw-rectangle* pane 0 0 w h :filled t :ink (pane-background pane)) ;; Draw greeting in center of pane (draw-text* pane (greeting *application-frame*) (floor w 2) (floor h 2) :toward-x 0))) ; I expect to get "dlroW olleH"
(defun make-and-run-hello-world () (run-frame-top-level (make-application-frame 'hello-world :height 300 :width 300))) ------------------------------------------------------------------------
and given the "toward-x" key given in the call to draw-text* (in handle-repaint), I'd expect to get a window with "dlroW olleH" printed; instead, I still get "Hello World". I tried a few other values for the toward-x key (e.g. (1- (floor w 2)), 1, -1), but saw no difference.
Grepping through the McCLIM source, I find that "toward-x" is mostly ignore'd in the various back ends (e.g., Backends/CLX/medium.lisp), so I am taking that as an indication that this functionality is not yet implemented. Is this correct? Or am I just using the facility incorrectly?
I'm sorry if this is a FAQ, but I looked at the "known bugs" page at http://mcclim.cliki.net/Bug, but didn't see anything there about draw-text* or its features...
Thanks!
Dan
Daniel Katz dpkatz@gmail.com writes:
Grepping through the McCLIM source, I find that "toward-x" is mostly ignore'd in the various back ends (e.g., Backends/CLX/medium.lisp), so I am taking that as an indication that this functionality is not yet implemented. Is this correct? Or am I just using the facility
You are correct, it is not yet implemented.
Paolo