[rkward-cvs] SF.net SVN: rkward: [1918] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Mon May 21 12:33:32 UTC 2007


Revision: 1918
          http://svn.sourceforge.net/rkward/?rev=1918&view=rev
Author:   tfry
Date:     2007-05-21 05:33:31 -0700 (Mon, 21 May 2007)

Log Message:
-----------
Add EPS compatibility option to export plugin

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/plugins/x11device/export.php
    trunk/rkward/rkward/plugins/x11device/export.rkh
    trunk/rkward/rkward/plugins/x11device/export.xml

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2007-05-21 12:32:52 UTC (rev 1917)
+++ trunk/rkward/ChangeLog	2007-05-21 12:33:31 UTC (rev 1918)
@@ -1,3 +1,5 @@
+- syntax highlighting is minimally faster for long outputs
+- graphics export plugin gains option for EPS compatibility
 - fixed: inserting / removing rows in the data editor in the presence of invalid fields in later rows would lead to a crash
 - fix some internal problems with enabledness/disabledness of plugin components
 - some complex plotting plugins now start up noticeably faster

Modified: trunk/rkward/rkward/plugins/x11device/export.php
===================================================================
--- trunk/rkward/rkward/plugins/x11device/export.php	2007-05-21 12:32:52 UTC (rev 1917)
+++ trunk/rkward/rkward/plugins/x11device/export.php	2007-05-21 12:33:31 UTC (rev 1918)
@@ -11,6 +11,7 @@
 		if ($gstype == "other") $gstype = getRK_val ("gs_specifiedformat");
 	} else {
 		$jpegpng = (($type == "jpeg") | ($type == "png"));
+		$eps = ($type == "postscript") && (getRK_val ("formateps"));
 
 		// Does the filename end with .ps/.eps or .pdf or .png or .jpeg/.jpg?
 		// If not, add the appropriate extension.
@@ -18,7 +19,11 @@
 			if ($type == "jpeg") {
 				if (!( ereg("\.jpeg$",$file)|ereg("\.jpg$",$file) )) $file .= ".jpg";
 			} elseif ($type == "postscript") {
-				if (!( ereg("\.ps$",$file)|ereg("\.eps$",$file) )) $file .= ".eps";
+				if ($eps) {
+					if (!( ereg("\.ps$",$file)|ereg("\.eps$",$file) )) $file .= ".eps";
+				} else {
+					if (!( ereg("\.ps$",$file)|ereg("\.eps$",$file) )) $file .= ".ps";
+				}
 			} else {
 				$ext = "." . $type;
 				if (!ereg($ext."$",$file)) $file .= $ext;
@@ -26,6 +31,7 @@
 		}
 	}
 	$options = "";
+	if (($type == "postscript") && $eps) $options .= ", onefile=FALSE";
 
 	// set $resolution appropriately:
 	if ($jpegpng || ($type == "gs")) {
@@ -56,16 +62,23 @@
 
 	// For ps/pdf: page, pagecentre, horizontal, family, encoding and title parameters:
 	if (!$jpegpng) {
-		$paper = getRK_val ("paper");
+		if (!($eps)) $paper = getRK_val ("paper");
+		else $paper = "special";
 		if (!empty ($paper)) $options .= ", paper=" . "\"" . $paper . "\"";
+
 		$pagecentre = getRK_val ("pagecentre");
 		if (!$pagecentre) $options .= ", pagecentre=FALSE";
-		$pshoriz = getRK_val ("ps_horiz");
+
+		if (!$eps) $pshoriz = getRK_val ("ps_horiz");
+		else $pshoriz = false;
 		if (!$pshoriz) $options .= ", horizontal=FALSE";
+
 		$family = getRK_val ("family");
 		if (!empty($family)) $options .= ", family=" . "\"" . $family . "\"";
+
 		$enc = getRK_val ("encoding");
 		if (!empty($enc)) $options .= ", encoding=" . "\"" . $enc . "\"";
+
 		if (!getRK_val("autotitle")) $options .= ", title=" . "\"" . getRK_val("title") . "\"";
 	}
 ?>

Modified: trunk/rkward/rkward/plugins/x11device/export.rkh
===================================================================
--- trunk/rkward/rkward/plugins/x11device/export.rkh	2007-05-21 12:32:52 UTC (rev 1917)
+++ trunk/rkward/rkward/plugins/x11device/export.rkh	2007-05-21 12:33:31 UTC (rev 1918)
@@ -12,8 +12,9 @@
 		<caption id="tab_file_and_type"/>
 
 		<setting id="file">The filename to save to. By default the file will be saved in the directory from where RkWard was started, which is the user's home directory when started from K-menu. After checking for a proper file extension, this is the <i>file</i> parameter to dev.print. For exporting via ghostscript provide a suitable extension.</setting>
-    <setting id="autoextension">Check this box to let RKWard detect the file extension automatically. If the filename specified in the 'File name' box already has a relevant extension, then nothing is done, that is, the specified filename is used. Otherwise a relevant extension is appended to the filename above to construct the full filename. This option is disabled for exporting via ghostscript.</setting>
+		<setting id="autoextension">Check this box to let RKWard detect the file extension automatically. If the filename specified in the 'File name' box already has a relevant extension, then nothing is done, that is, the specified filename is used. Otherwise a relevant extension is appended to the filename above to construct the full filename. This option is disabled for exporting via ghostscript.</setting>
 		<setting id="format">Choose whether to use postscript or pdf or png or jpeg for exporting the file. This is the <i>device</i> parameter to dev.print. If 'via Ghostscript' is chosen then the output format of the ghostscript device will need to be provided (see below under 'Ghostscript specific options').</setting>
+		<setting id="formateps">When exporting in postscript format, this allows you to select, whether an EPSF (.eps-file) header should be generated. This seems to generate more portable files, so is recommended in most cases. Papersize and orientation can not be set in this case. This sets the <i>onefile</i> parameter to postscript to FALSE.</setting>
 
 		<caption id="frame_dimensions"/>
 		<setting id="autowidth">Check this box to let the export function determine the width automatically.</setting>

Modified: trunk/rkward/rkward/plugins/x11device/export.xml
===================================================================
--- trunk/rkward/rkward/plugins/x11device/export.xml	2007-05-21 12:32:52 UTC (rev 1917)
+++ trunk/rkward/rkward/plugins/x11device/export.xml	2007-05-21 12:33:31 UTC (rev 1918)
@@ -17,13 +17,18 @@
 		<convert id="isPSGS" mode="or" sources="isPS;isGS" />
 		<convert id="isnotGS" mode="or" sources="isPSPDF;isJPEGPNG" />
 
+		<connect client="formateps.enabled" governor="isPS"/>
+		<convert id="isEPS" mode="and" sources="formateps.enabled;formateps.state"/>
+		<convert id="allowOrientation" mode="and" sources="isPSGS;isEPS.not"/>
+
 		<connect client="autoextension.state" governor="isnotGS"/>
 		<connect client="autoextension.enabled" governor="isnotGS"/>
 
 		<connect client="tab_more_options.enabled" governor="isPSPDFGS" />
 
 		<connect client="autoquality.enabled" governor="isJPEG" />
-		<connect client="ps_horiz.enabled" governor="isPSGS"/>
+		<connect client="ps_horiz.enabled" governor="allowOrientation"/>
+		<connect client="paper.enabled" governor="isEPS.not"/>
 
 		<convert id="userwidth0" mode="equals" sources="autowidth.state" standard="0" />
 		<connect client="width.enabled" governor="userwidth0"/>
@@ -79,6 +84,7 @@
 							<option value="jpeg" label="JPEG" />
 							<option value="gs" label="via Ghostscript" />
 						</radio>
+						<checkbox id="formateps" label="EPS compatible" checked="true" value="1" value_unchecked="0"/>
 					</column>
 				</row>
 				<row>


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