[rkward-cvs] SF.net SVN: rkward:[2777] trunk/rkward/rkward/plugins/x11device/export.js

tfry at users.sourceforge.net tfry at users.sourceforge.net
Tue Mar 9 11:34:45 UTC 2010


Revision: 2777
          http://rkward.svn.sourceforge.net/rkward/?rev=2777&view=rev
Author:   tfry
Date:     2010-03-09 11:34:45 +0000 (Tue, 09 Mar 2010)

Log Message:
-----------
Safer handling of SVG.

Modified Paths:
--------------
    trunk/rkward/rkward/plugins/x11device/export.js

Modified: trunk/rkward/rkward/plugins/x11device/export.js
===================================================================
--- trunk/rkward/rkward/plugins/x11device/export.js	2010-03-09 11:25:17 UTC (rev 2776)
+++ trunk/rkward/rkward/plugins/x11device/export.js	2010-03-09 11:34:45 UTC (rev 2777)
@@ -1,3 +1,13 @@
+function preprocess () {
+	if (getValue ("format") == "svg") {
+		echo ('if (!capabilities ("cairo")) {\n');
+		echo ('	# The "cairo" library, providing SVG-support, is not compiled in by default on some systems.\n');
+		echo ('	require (cairoDevice)\n');
+		echo ('	svg <- Cairo_svg\n');
+		echo ('}\n');
+	}
+}
+
 function calculate () {
 	var type = getValue ("format");
 	var file = getValue ("file");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list