Function: pixel-posn-y-at-point

pixel-posn-y-at-point is a byte-compiled function defined in pixel-scroll.el.gz.

Signature

(pixel-posn-y-at-point)

Documentation

Return y coordinates of point in pixels of current window.

This returns nil when horizontally scrolled.

Source Code

;; Defined in /usr/src/emacs/lisp/pixel-scroll.el.gz
  (<= (count-lines (window-start) (window-end)) 2)) ; count-screen-lines

(defun pixel-posn-y-at-point ()
  "Return y coordinates of point in pixels of current window.
This returns nil when horizontally scrolled."
  (when (equal (window-hscroll) 0)
    (save-excursion
      ;; When there's an overlay string on a line, move
      ;; point by (beginning-of-visual-line).
      (beginning-of-visual-line)
      ;; (- (cadr (pos-visible-in-window-p (point) nil t))
      ;;    (line-pixel-height))
      (cdr (posn-x-y (posn-at-point))))))