From: SourceForge.net <no...@so...> - 2008-10-27 15:56:36
|
Bugs item #2159172, was opened at 2008-10-11 07:12 Message generated for change (Comment added) made by sds You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=2159172&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: clx Group: lisp error Status: Open Resolution: None Priority: 5 Private: No Submitted By: Drutsa Pavel (rawlik) Assigned to: Sam Steingold (sds) Summary: text drawing functions ignore :start & :end parameters Initial Comment: DRAW-GLYPHS and DRAW-IMAGE-GLYPHS functions ingnore :start and :end parameters ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-10-27 11:56 Message: thanks - next time please supply the test case in a form suitable for new-clx/test.tst ---------------------------------------------------------------------- Comment By: Drutsa Pavel (rawlik) Date: 2008-10-27 10:43 Message: (require "clx") (defvar use-timeout 1) (defvar start-text 0) (defvar end-text 1) (defvar draw-message "Hello world! This is the start and end test") (defvar font) (defun draw-hello (drawable g-context x y text &key start end) (let ((draw-part (subseq text start end))) (xlib:draw-glyphs drawable g-context x y draw-part ) ) ) (defun events (&rest event-data &key display event-key send-event-p window &allow-other-keys) (when (eq event-key :exposure) (let ((gc (xlib:create-gcontext :drawable window :foreground 0 :font font))) (draw-hello window gc 10 10 draw-message :start start-text :end end-text) (xlib:draw-glyphs window gc 10 30 draw-message :start start-text :end end-text) ) ) ) (let* ((dpy (xlib:open-display "")) (top-win (xlib:create-window :parent (xlib:screen-root (first (xlib:display-roots dpy) )) :x 100 :y 100 :width 250 :height 250 :bit-gravity :north-west :background 1617116666 :event-mask (xlib:MAKE-EVENT-MASK :exposure))) (font (xlib:open-font dpy "fixed")) ) (xlib:map-window top-win) (xlib:display-force-output dpy) (loop (xlib:process-event dpy :handler #'events :timeout use-timeout :discard-p t) (incf end-text) (if (> end-text (length draw-message)) (setf end-text 1)) (xlib:clear-area top-win :exposures-p t) ) ) ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-10-23 17:20 Message: looks good. now, we need a test case and the patch will be complete. ---------------------------------------------------------------------- Comment By: Drutsa Pavel (rawlik) Date: 2008-10-22 20:25 Message: Somebody, look at my second patch, please. ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-10-13 12:02 Message: see test_vector_limits() ---------------------------------------------------------------------- Comment By: Drutsa Pavel (rawlik) Date: 2008-10-13 06:30 Message: I suppose that the :start and :end parameters are natural numbers. They will be truncated quiet up to the string length. That kind of other validity cheks will be suitable? ---------------------------------------------------------------------- Comment By: Sam Steingold (sds) Date: 2008-10-11 23:34 Message: thanks for the patch. you are not testing whether the :start/:stop parameters are actually valid, aren't you? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=2159172&group_id=1355 |