Function: pdf-util-scale-pixel-to-relative

pdf-util-scale-pixel-to-relative is a natively compiled function defined in pdf-util.el.

Signature

(pdf-util-scale-pixel-to-relative LIST-OF-PIXEL-EDGES &optional ROUNDING-FN DISPLAYED-P WINDOW)

Documentation

Scale LIST-OF-PIXEL-EDGES to relative values.

The result depends on the currently displayed page in WINDOW. See also pdf-util-scale.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-util.el
(defun pdf-util-scale-pixel-to-relative (list-of-pixel-edges
                                         &optional rounding-fn displayed-p window)
  "Scale LIST-OF-PIXEL-EDGES to relative values.

The result depends on the currently displayed page in WINDOW.
See also `pdf-util-scale'."
  (when displayed-p (pdf-util-assert-pdf-window window))
  (pdf-util-scale-to
   list-of-pixel-edges
   (pdf-view-image-size displayed-p window)
   '(1.0 . 1.0)
   rounding-fn))