diff options
| -rw-r--r-- | src/xfns.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/xfns.c b/src/xfns.c index 9071b89acd9..9d90b7ba35f 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -6559,11 +6559,12 @@ present and mapped to the usual X keysyms. */) | |||
| 6559 | 6559 | ||
| 6560 | #ifdef USE_CAIRO | 6560 | #ifdef USE_CAIRO |
| 6561 | DEFUN ("x-export-frames", Fx_export_frames, Sx_export_frames, 0, 2, 0, | 6561 | DEFUN ("x-export-frames", Fx_export_frames, Sx_export_frames, 0, 2, 0, |
| 6562 | doc: /* XXX Experimental. Return image data of FRAMES in TYPE format. | 6562 | doc: /* Return image data of FRAMES in TYPE format. |
| 6563 | FRAMES should be nil (the selected frame), a frame, or a list of | 6563 | FRAMES should be nil (the selected frame), a frame, or a list of |
| 6564 | frames (each of which corresponds to one page). Optional arg TYPE | 6564 | frames (each of which corresponds to one page). Optional arg TYPE |
| 6565 | should be either `pdf' (default), `png', `ps', or `svg'. Supported | 6565 | should be either `pdf' (default), `png', `postscript', or `svg'. |
| 6566 | types are determined by the compile-time configuration of cairo. */) | 6566 | Supported types are determined by the compile-time configuration of |
| 6567 | cairo. */) | ||
| 6567 | (Lisp_Object frames, Lisp_Object type) | 6568 | (Lisp_Object frames, Lisp_Object type) |
| 6568 | { | 6569 | { |
| 6569 | Lisp_Object result, rest, tmp; | 6570 | Lisp_Object result, rest, tmp; |
| @@ -6590,12 +6591,12 @@ types are determined by the compile-time configuration of cairo. */) | |||
| 6590 | frames = Fnreverse (tmp); | 6591 | frames = Fnreverse (tmp); |
| 6591 | 6592 | ||
| 6592 | #ifdef CAIRO_HAS_PDF_SURFACE | 6593 | #ifdef CAIRO_HAS_PDF_SURFACE |
| 6593 | if (NILP (type) || EQ (type, intern ("pdf"))) /* XXX: Qpdf */ | 6594 | if (NILP (type) || EQ (type, Qpdf)) |
| 6594 | surface_type = CAIRO_SURFACE_TYPE_PDF; | 6595 | surface_type = CAIRO_SURFACE_TYPE_PDF; |
| 6595 | else | 6596 | else |
| 6596 | #endif | 6597 | #endif |
| 6597 | #ifdef CAIRO_HAS_PNG_FUNCTIONS | 6598 | #ifdef CAIRO_HAS_PNG_FUNCTIONS |
| 6598 | if (EQ (type, intern ("png"))) | 6599 | if (EQ (type, Qpng)) |
| 6599 | { | 6600 | { |
| 6600 | if (!NILP (XCDR (frames))) | 6601 | if (!NILP (XCDR (frames))) |
| 6601 | error ("PNG export cannot handle multiple frames."); | 6602 | error ("PNG export cannot handle multiple frames."); |
| @@ -6604,12 +6605,12 @@ types are determined by the compile-time configuration of cairo. */) | |||
| 6604 | else | 6605 | else |
| 6605 | #endif | 6606 | #endif |
| 6606 | #ifdef CAIRO_HAS_PS_SURFACE | 6607 | #ifdef CAIRO_HAS_PS_SURFACE |
| 6607 | if (EQ (type, intern ("ps"))) | 6608 | if (EQ (type, Qpostscript)) |
| 6608 | surface_type = CAIRO_SURFACE_TYPE_PS; | 6609 | surface_type = CAIRO_SURFACE_TYPE_PS; |
| 6609 | else | 6610 | else |
| 6610 | #endif | 6611 | #endif |
| 6611 | #ifdef CAIRO_HAS_SVG_SURFACE | 6612 | #ifdef CAIRO_HAS_SVG_SURFACE |
| 6612 | if (EQ (type, intern ("svg"))) | 6613 | if (EQ (type, Qsvg)) |
| 6613 | { | 6614 | { |
| 6614 | /* For now, we stick to SVG 1.1. */ | 6615 | /* For now, we stick to SVG 1.1. */ |
| 6615 | if (!NILP (XCDR (frames))) | 6616 | if (!NILP (XCDR (frames))) |
| @@ -6763,6 +6764,8 @@ syms_of_xfns (void) | |||
| 6763 | DEFSYM (Qmono, "mono"); | 6764 | DEFSYM (Qmono, "mono"); |
| 6764 | 6765 | ||
| 6765 | #ifdef USE_CAIRO | 6766 | #ifdef USE_CAIRO |
| 6767 | DEFSYM (Qpdf, "pdf"); | ||
| 6768 | |||
| 6766 | DEFSYM (Qorientation, "orientation"); | 6769 | DEFSYM (Qorientation, "orientation"); |
| 6767 | DEFSYM (Qtop_margin, "top-margin"); | 6770 | DEFSYM (Qtop_margin, "top-margin"); |
| 6768 | DEFSYM (Qbottom_margin, "bottom-margin"); | 6771 | DEFSYM (Qbottom_margin, "bottom-margin"); |