aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2016-06-27 18:20:48 +0200
committerLars Magne Ingebrigtsen2016-06-27 18:20:57 +0200
commit44caa96dc5c16cbc4ee1bb26ec880af2e2ecf9f8 (patch)
tree5b2f03fdd02d3ed687e9ffb9cba1f9516e883a10 /doc
parent058e8562775571790e48b1614e84a9617a9e1e17 (diff)
downloademacs-44caa96dc5c16cbc4ee1bb26ec880af2e2ecf9f8.tar.gz
emacs-44caa96dc5c16cbc4ee1bb26ec880af2e2ecf9f8.zip
Add a new function `svg-embed'
* doc/lispref/display.texi (SVG Images): Document `svg-embed'. * lisp/svg.el (svg-embed): New function. (svg--image-data): Ditto.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/display.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index a7c1d0992de..575cad89f83 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -5350,6 +5350,19 @@ that describe the outer circumference of the polygon.
5350@end lisp 5350@end lisp
5351@end defun 5351@end defun
5352 5352
5353@defun svg-embed svg image image-type datap &rest args
5354Add an embedded (raster) image to @var{svg}. If @var{datap} is
5355@code{nil}, @var{IMAGE} should be a file name; if not, it should be a
5356binary string containing the image data. @var{image-type} should be a
5357@acronym{MIME} image type, for instance @samp{"image/jpeg"}.
5358
5359@lisp
5360(svg-embed svg "~/rms.jpg" "image/jpeg" nil
5361 :width "100px" :height "100px"
5362 :x "50px" :y "75px")
5363@end lisp
5364@end defun
5365
5353Finally, the @code{svg-image} takes an SVG object as its parameter and 5366Finally, the @code{svg-image} takes an SVG object as its parameter and
5354returns an image object suitable for use in functions like 5367returns an image object suitable for use in functions like
5355@code{insert-image}. Here's a complete example that creates and 5368@code{insert-image}. Here's a complete example that creates and