draw-glyphs

Christophe Rhodes <[email protected]> Thu, 09 Mar 2006 11:30:39 +0000
Newsgroups gmane.lisp.clx.devel
Message-ID <[email protected]>
Hi,

It would seem that the CLX documentation and the implementation of the
:size argument to DRAW-GLYPHS are at variance.  The documentation says

  The :size specifies the element size of the destination buffer given
  to :translate (either 8, 16, or :default ). If :default is
  specified, the size is based on the current font, if known;
  otherwise, 16 is used.

However, the current implementation in at least my darcs tree is 

 (ecase size
    ((:default 8) (draw-glyphs8 drawable gcontext x y sequence start end
                                (or translate #'translate-default) width))
    (16 (draw-glyphs16 drawable gcontext x y sequence start end
                       (or translate #'translate-default) width))))

(and a similar logic for DRAW-GLYPH).  To add to the fun, above
DRAW-GLYPHS16 there is a comment

;; NOTE: After the first font change by the TRANSLATE function,
;; characters are no-longer on 16bit boundaries and this function
;; garbles the bytes.

which maybe means that the support for writing with 16-bit fonts is
not quite fully baked?

I don't really have time to look into this right now, but I thought I
would mail in case anyone did, and so that there might be a record.

Cheers,

Christophe

_______________________________________________
Portable-clx mailing list
[email protected]
http://lists.metacircles.com/cgi-bin/mailman/listinfo/portable-clx
See http://www.cliki.net/clx for darcs URL(s)