mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 23:41:38 -05:00
jupyter-insert-image: Support needs_background metadata key
This commit is contained in:
parent
a9caf5185a
commit
3752fff116
1 changed files with 6 additions and 2 deletions
|
@ -368,8 +368,12 @@ image."
|
||||||
TYPE has the same meaning as in `create-image'. METADATA is a
|
TYPE has the same meaning as in `create-image'. METADATA is a
|
||||||
plist containing :width and :height keys that will be used as the
|
plist containing :width and :height keys that will be used as the
|
||||||
width and height of the image."
|
width and height of the image."
|
||||||
(cl-destructuring-bind (&key width height &allow-other-keys) metadata
|
(cl-destructuring-bind (&key width height needs_background &allow-other-keys)
|
||||||
(let ((img (create-image data type 'data :width width :height height)))
|
metadata
|
||||||
|
(let ((img (create-image
|
||||||
|
data type 'data :width width :height height
|
||||||
|
:mask (when needs_background
|
||||||
|
'(heuristic t)))))
|
||||||
(insert-image img))))
|
(insert-image img))))
|
||||||
|
|
||||||
;;; Plain text
|
;;; Plain text
|
||||||
|
|
Loading…
Add table
Reference in a new issue