Function: pdf-cache--image-match

pdf-cache--image-match is a natively compiled function defined in pdf-cache.el.

Signature

(pdf-cache--image-match IMAGE PAGE MIN-WIDTH &optional MAX-WIDTH HASH)

Documentation

Match IMAGE with specs.

IMAGE should be a list as created by pdf-cache--make-image.

Return non-nil, if IMAGE's page is the same as PAGE, its width is at least MIN-WIDTH and at most MAX-WIDTH and its stored hash-value is eql to HASH.

Source Code

;; Defined in /nix/store/63h5z2vmzn0mfavcxi2idi23g5xcgkbl-emacs-packages-deps/share/emacs/site-lisp/elpa/pdf-tools-20260102.1101/pdf-cache.el
(defun pdf-cache--image-match (image page min-width &optional max-width hash)
  "Match IMAGE with specs.

IMAGE should be a list as created by `pdf-cache--make-image'.

Return non-nil, if IMAGE's page is the same as PAGE, its width
is at least MIN-WIDTH and at most MAX-WIDTH and its stored
hash-value is `eql' to HASH."
  (and (= (pdf-cache--image/page image)
          page)
       (or (null min-width)
           (>= (pdf-cache--image/width image)
               min-width))
       (or (null max-width)
           (<= (pdf-cache--image/width image)
               max-width))
       (eql (pdf-cache--image/hash image)
            hash)))