Revision: 20078 http://sourceforge.net/p/jmol/code/20078 Author: hansonr Date: 2014-10-15 03:35:04 +0000 (Wed, 15 Oct 2014) Log Message: ----------- Jmol.___JmolVersion="14.3.8_2014.10.14"
new feature: transparent GIF using WRITE GIFT "xxx.gif" new feature: GIF images use dithering to approximate full palette. new feature: CAPTURE "file.gif" 10 transparent - or CAPTURE "file.gift" -- "gift" automatically changed to "gif" Modified Paths: -------------- trunk/Jmol/src/org/jmol/scriptext/CmdExt.java Modified: trunk/Jmol/src/org/jmol/scriptext/CmdExt.java =================================================================== --- trunk/Jmol/src/org/jmol/scriptext/CmdExt.java 2014-10-15 03:12:16 UTC (rev 20077) +++ trunk/Jmol/src/org/jmol/scriptext/CmdExt.java 2014-10-15 03:35:04 UTC (rev 20078) @@ -497,7 +497,7 @@ } if (fileName.toLowerCase().endsWith(".gift")) { isTransparent = true; - fileName = fileName.substring(0, fileName.length() - 1); + fileName = fileName.substring(0, fileName.length() - 1); } if (!fileName.toLowerCase().endsWith(".gif")) fileName += ".gif"; @@ -510,24 +510,30 @@ String s = null; String axis = "y"; looping = true; - i = 3; - if (isRock) { - if (tokAt(i) != T.integer) + i++; + if (isRock) { + if (tokAt(i) != T.integer && tokAt(i) != T.translucent) + axis = e.optParameterAsString(i++).toLowerCase(); + s = "rotate Y 10 10;rotate Y -10 -10;rotate Y -10 -10;rotate Y 10 10"; + s = PT.rep(s, "10", "" + + (tokAt(i) == T.nada || tokAt(i) == T.translucent ? 5 + : intParameter(i++))); + } else { + if (tokAt(i) != T.translucent) axis = e.optParameterAsString(i++).toLowerCase(); - s = "rotate Y 10 10;rotate Y -10 -10;rotate Y -10 -10;rotate Y 10 10"; - s = PT.rep(s, "10", "" + (tokAt(i) == T.nada ? 5 : intParameter(i++))); - } else { - axis = e.optParameterAsString(i).toLowerCase(); - s = "rotate Y 360 30;"; - } + s = "rotate Y 360 30;"; + } if (chk) return; vwr.setNavigationMode(false); if (axis == "" || "xyz".indexOf(axis) < 0) axis = "y"; boolean wf = vwr.g.waitForMoveTo; - s = "set waitformoveto true;" + PT.rep(s, "Y", axis) + ";set waitformoveto " + wf; - s = "capture " + PT.esc(fileName) + (isTransparent ? " transparent" : "") + " -1;" + s + ";capture;"; + isTransparent |= (tokAt(i) == T.translucent); + s = "set waitformoveto true;" + PT.rep(s, "Y", axis) + + ";set waitformoveto " + wf; + s = "capture " + PT.esc(fileName) + " -1" + + (isTransparent ? " transparent;" : ";")+ s + ";capture;"; e.cmdScript(0, null, s); return; case T.decimal: @@ -560,13 +566,12 @@ } if (chk || params == null) return; - params.put ("type", "GIF"); + params.put("type", "GIF"); if (isTransparent || tokAt(i) == T.translucent) - params.put("transparentColor", - Integer.valueOf(vwr.getBackgroundArgb())); + params.put("transparentColor", Integer.valueOf(vwr.getBackgroundArgb())); params.put("fileName", fileName); params.put("quality", Integer.valueOf(-1)); - params.put( + params.put( "endTime", Long.valueOf(endTime < 0 ? -1 : System.currentTimeMillis() + (long) (endTime * 1000))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits