CLIM mail archive
I'm trying to control some of my output with clipping regions. but it
isn't working as expected. I did figure out that a bounding-rectangle
is a valid clipping-region (although the book can be read to imply
I want to clip some text (and thus the presentation) into a rectangle.
sounds simple, no?
where I use
(with-drawing-options (stream :clipping-region <the rectangle>
(present "lotsoftexthere" 'string stream)
what I want:
what I get:
the rectangle "drawn" above is actually the sensitive area you see
with highlighting. the clipping region just surrounds the string
"texthere". but the presentation is not affected by the clipping
have I done something wrong or is there an actual error here? it's not
like I need to do something fancy, I want ti clip drawing inside a
rectangular area and have the presentation be the size/location of the
or should I just modify the presentation myself afterwards somehow?
later: I figured out how to modify the presentation in a way that is
undoubtedly NOT safe, but does work.
(setq <cell> (present "lotsoftexthere" 'string))
;;some stuff which corrects for clipping-region errors...
;;this form corrects for the presentation's width...
(setf (slot-value (slot-value (slot-value <cell> 'clim-internals::elements)
;;and this one corrects for it's left-edge.
(setf (slot-value <cell> 'clim-internals::start-x) <some-x>)
real question: what is the correct way to get what I want here?
Main Index |