Function: chart-display-label

chart-display-label is a byte-compiled function defined in chart.el.gz.

Signature

(chart-display-label LABEL DIR ZONE START END &optional FACE)

Documentation

Display LABEL in direction DIR in column/row ZONE between START and END.

Optional argument FACE is the property we wish to place on this text.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/chart.el.gz
(defun chart-display-label (label dir zone start end &optional face)
  "Display LABEL in direction DIR in column/row ZONE between START and END.
Optional argument FACE is the property we wish to place on this text."
  (if (eq dir 'horizontal)
      (let (p1)
	(chart-goto-xy (+ start (- (/ (- end start) 2) (/ (length label) 2)))
		       zone)
	(setq p1 (point))
	(insert label)
	(chart-zap-chars (length label))
	(put-text-property p1 (point) 'face face)
	)
    (let ((i 0)
	  (stz (+ start (- (/ (- end start) 2) (/ (length label) 2)))))
      (while (< i (length label))
	(chart-goto-xy zone (+ stz i))
	(insert (aref label i))
	(chart-zap-chars 1)
	(put-text-property (1- (point)) (point) 'face face)
	(setq i (1+ i))))))