summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2016-06-27 18:20:48 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2016-06-27 18:20:57 +0200
commit44caa96dc5c16cbc4ee1bb26ec880af2e2ecf9f8 (patch)
tree5b2f03fdd02d3ed687e9ffb9cba1f9516e883a10 /doc
parent058e8562775571790e48b1614e84a9617a9e1e17 (diff)
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 a7c1d0992d..575cad89f8 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -5350,6 +5350,19 @@ that describe the outer circumference of the polygon.
@end lisp
@end defun
+@defun svg-embed svg image image-type datap &rest args
+Add an embedded (raster) image to @var{svg}. If @var{datap} is
+@code{nil}, @var{IMAGE} should be a file name; if not, it should be a
+binary string containing the image data. @var{image-type} should be a
+@acronym{MIME} image type, for instance @samp{"image/jpeg"}.
+
+@lisp
+(svg-embed svg "~/rms.jpg" "image/jpeg" nil
+ :width "100px" :height "100px"
+ :x "50px" :y "75px")
+@end lisp
+@end defun
+
Finally, the @code{svg-image} takes an SVG object as its parameter and
returns an image object suitable for use in functions like
@code{insert-image}. Here's a complete example that creates and