CLIM mail archive
[Prev][Next][Index][Thread]
filling-output and cells
I'm trying to use filling-output inside a cell, and have the resulting
text centered both x and Y. it appears not to be centering.
what I want: (this is drawn inside a circle, so I KNOW when it fails)
"testing testing" should end up as
/|\
/ | \
/ | \
__/testing\__
\testing/
\ | /
\ | /
\|/
(ok it's sloppy--this ain't NeXTMail or something!)
anyway, I want the text exactly centered across multiple linebreaks,
and the circle is to be centered with the text, as [very] roughly
shown. i've used :align-x and :align-y with :centered.
is this a bug?
here's a code-frag:
(DEFUN print-patient-pp-data (frame stream
&optional (patient *patient*)
&aux width ph)
(declare (ignore frame))
(clim:formatting-table (STREAM
:inter-row-spacing 20
:equalize-column-widths t
:multiple-columns 6
:multiple-columns-inter-column-spacing '(50 :pixel))
(clim:formatting-row (STREAM)
(dolist (pp (pps patient))
(clim:formatting-cell (STREAM :align-x :center :align-y :center)
(clim:with-output-as-presentation (:object pp :stream stream :single-box t)
;;now draw the circle...
(clim:draw-circle* stream 25 25 50
:filled (slot-value pp 'highlighted)
:ink (if (slot-value pp 'highlighted)
clim:+flipping-ink+
clim:+foreground+)
))
;;drawing the string MUST occur after the circle.
;;now draw the text, inverting the bits over the rectangle and the circle.
(clim:with-drawing-options (stream :ink (if (slot-value pp 'highlighted)
clim:+flipping-ink+
clim:+foreground+)
)
(clim:with-text-family (:sans-serif stream)
(clim:filling-output (stream :fill-width '(100 :pixel))
(princ (string (name pp)) stream))
))
))
)
))
-- clint
----- End of forwarded message -----
0,,
Follow-Ups:
Main Index |
Thread Index