CLIM mail archive


Does ink affect non-drawn text?

    Date: Thu, 2 Jan 1992 14:30 EST

    Consider the following function:

    (defun color-text1 0(ink)
      (clim:with-drawing-options (nil :ink ink)
	(write-line "hi there")

    Should "hi there" always print in the foreground color, or should its
    presence/absence/color depend in some way on the argument to COLOR-TEXT?

All output functions observe the medium's drawing state.  Therefore, the
call to WRITE-LINE is affected by with-drawing-options, and hence by the
argument to COLOR-TEXT.

    On my monochrome Symbolics XL1200, passing COLOR-TEXT a sufficiently
    dark color such as CLIM:+GREEN+ causes "hi there" to print (in black on
    a white background, i.e. the foreground color); passing COLOR-TEXT a
    lighter color such as CLIM:+CYAN+ causes "hi there" not to show up at
    all.  (Presumably, it is printing in the background color.)

On a monochrome display, colors are rendered by simulating their
approximate luminosity with a stipple.  My guess is that the stipple
used to render green is dense enough to show some bits on the screen,
whereas the stipple for cyan, by chance, does not have any bits that
show up in the rendering of the text.

I also think that the formula used to compute the luminosity is not
correct in the released version of CLIM 1.0.  I fixed this in the
development version of CLIM a while back...


Main Index | Thread Index