From: <ha...@us...> - 2010-04-07 13:04:51
|
Revision: 12779 http://jmol.svn.sourceforge.net/jmol/?rev=12779&view=rev Author: hansonr Date: 2010-04-07 13:04:44 +0000 (Wed, 07 Apr 2010) Log Message: ----------- version=12.0.RC4_dev # code: hermite renderer did not need global integer -- causing exception when rendering threads clash # bug fix: write PNG does not properly indicate that it is going to the clipboard Modified Paths: -------------- trunk/Jmol/src/org/jmol/export/image/ImageCreator.java trunk/Jmol/src/org/jmol/g3d/Hermite3D.java trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/export/image/ImageCreator.java =================================================================== --- trunk/Jmol/src/org/jmol/export/image/ImageCreator.java 2010-04-06 22:02:08 UTC (rev 12778) +++ trunk/Jmol/src/org/jmol/export/image/ImageCreator.java 2010-04-07 13:04:44 UTC (rev 12779) @@ -65,10 +65,10 @@ if (text == null) { Image image = viewer.getScreenImage(); ImageSelection.setClipboard(image); - msg = "OK " + (image.getWidth(null) * image.getHeight(null)); + msg = "OK image to clipboard: " + (image.getWidth(null) * image.getHeight(null)); } else { ImageSelection.setClipboard(text); - msg = "OK " + text.length(); + msg = "OK text to clipboard: " + text.length(); } } catch (Error er) { msg = viewer.getErrorMessage(); Modified: trunk/Jmol/src/org/jmol/g3d/Hermite3D.java =================================================================== --- trunk/Jmol/src/org/jmol/g3d/Hermite3D.java 2010-04-06 22:02:08 UTC (rev 12778) +++ trunk/Jmol/src/org/jmol/g3d/Hermite3D.java 2010-04-07 13:04:44 UTC (rev 12779) @@ -68,7 +68,6 @@ private final float[] sLeft = new float[16]; private final float[] sRight = new float[16]; - int sp; private final Point3f[] pTopLeft = new Point3f[16]; private final Point3f[] pTopRight = new Point3f[16]; @@ -105,7 +104,7 @@ pLeft[0].set(p1); sRight[0] = 1; pRight[0].set(p2); - sp = 0; + int sp = 0; int n=0; int dDiameterFirstHalf = 0; int dDiameterSecondHalf = 0; @@ -209,7 +208,7 @@ sLeft[0] = 0; sRight[0] = 1; needToFill[0] = true; - sp = 0; + int sp = 0; boolean closeEnd = false; do { Point3f a = pTopLeft[sp]; @@ -337,7 +336,7 @@ pLeft[0].set(p1); sRight[0] = 1; pRight[0].set(p2); - sp = 0; + int sp = 0; for (int strands = 2; strands > 0; strands--) { if (strands == 1) { Modified: trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2010-04-06 22:02:08 UTC (rev 12778) +++ trunk/Jmol/src/org/jmol/script/ScriptEvaluator.java 2010-04-07 13:04:44 UTC (rev 12779) @@ -11735,7 +11735,7 @@ } switch (tokAt(pt, args)) { case Token.nada: - isShow = true; + case Token.clipboard: break; case Token.identifier: case Token.string: @@ -11756,8 +11756,6 @@ if (fileName.equalsIgnoreCase("clipboard")) fileName = null; break; - case Token.clipboard: - break; default: error(ERROR_invalidArgument); } @@ -11797,9 +11795,11 @@ type = "XYZ"; } boolean isImage = Parser.isOneOf(type, "GIF;JPEG64;JPEG;JPG64;JPG;PPM;PNG"); - if (isImage && (isApplet && !viewer.isSignedApplet() || isShow)) + if (isImage && fileName == null) + type = "[image to clipboard]"; + else if (isImage && (isApplet && !viewer.isSignedApplet() || isShow)) type = "JPG64"; - if (!isImage + else if (!isImage && !isExport && !Parser .isOneOf( @@ -11940,20 +11940,21 @@ // load error here scriptStatusOrBuffer((String) bytes); return ""; + } else { + if (bytes == null && (!isImage || fileName != null)) + bytes = data; + if (doDefer) + msg = viewer.streamFileData(fileName, type, type2); + else + msg = viewer.createImage(fileName, type, bytes, quality, width, height, + bsFrames, fullPath); + if (msg != null) { + if (!msg.startsWith("OK")) + evalError(msg, null); + scriptStatusOrBuffer(msg + + (isImage ? "; width=" + width + "; height=" + height : "")); + } } - if (bytes == null && (!isImage || fileName != null)) - bytes = data; - if (doDefer) - msg = viewer.streamFileData(fileName, type, type2); - else - msg = viewer.createImage(fileName, type, bytes, quality, width, height, - bsFrames, fullPath); - if (msg != null) { - if (!msg.startsWith("OK")) - evalError(msg, null); - scriptStatusOrBuffer(msg - + (isImage ? "; width=" + width + "; height=" + height : "")); - } return ""; } Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2010-04-06 22:02:08 UTC (rev 12778) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2010-04-07 13:04:44 UTC (rev 12779) @@ -3,6 +3,8 @@ version=12.0.RC4_dev +# code: hermite renderer did not need global integer -- causing exception when rendering threads clash +# bug fix: write PNG does not properly indicate that it is going to the clipboard # code: better handling of VAR local variables # new feature: VAR variables are now local to FOR and WHILE loops, as in Java # new feature: { } will group contexts for VAR variables: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |