CLIM mail archive

[Prev][Next][Index][Thread]

Re: multiple-color drawing...



    Date: Mon, 24 Jan 1994 10:20 EST
    From: berni@iml.fhg.de

	    Date: Fri, 21 Jan 1994 22:10 EST
	    From: Colin Meldrum <colin@franz.com>
    
	    At the moment the best you can do is to find the bounding rectangle of
	    the
	    text you are going to draw, draw a filled rectangle in the text
	    background
	    and then draw the text in the text foreground. This works fine if you
	    are
	    drawing all your text explicitly with calls to draw-text - but it
	    becomes
	    tricky if your text output is produced by format onto a clim-stream
	    within
	    a filling-output for example.
    
	SURROUNDING-OUTPUT-WITH-BORDER already does the right thing.

    But how can I use SURROUNDING-OUTPUT-WITH-BORDER to do the trick of drawing a 
    filled (and opaque) background rectangle *behind* the surrounded stuff?


    ;;; - Stefan Bernemann   (berni@iml.fhg.de)

I may be missing a critical part of this discussion, but I believe that
surrounding-output-with-border DOES arrange to draw the border `behind'
the surrounded stuff.  The source even anounces that it is kludged to
make that so.

Further, surrounding-output--- accepts drawing options so that you can
specify :filled t and whatever ink.  
For example, the following does something like what I'm thinking you
want [It's on a lispm where black text on white is default.  This
puts white text on a black rectangular background of appropriate size]. 

  (let ((s *standard-output*))
    (with-room-for-graphics (s)
      (surrounding-output-with-border (s :shape :rectangle :filled t)
	(with-drawing-options (s :ink +white+)
	  (format s "Hello!!!")))))

  bruce
  miller@cam.nist.gov
  

References:

Main Index | Thread Index