From: <ha...@us...> - 2011-08-02 00:02:43
|
Revision: 15910 http://jmol.svn.sourceforge.net/jmol/?rev=15910&view=rev Author: hansonr Date: 2011-08-02 00:02:36 +0000 (Tue, 02 Aug 2011) Log Message: ----------- isosurface color red blue t.jvxl Modified Paths: -------------- trunk/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java Modified: trunk/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java =================================================================== --- trunk/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java 2011-08-01 23:50:35 UTC (rev 15909) +++ trunk/Jmol/src/org/jmol/jvxl/readers/JvxlXmlReader.java 2011-08-02 00:02:36 UTC (rev 15910) @@ -234,7 +234,7 @@ if (params.isBicolorMap || params.colorBySign) jvxlCutoff = 0; jvxlDataIsColorMapped = - (params.colorRgb == Integer.MIN_VALUE + ((params.colorRgb == Integer.MIN_VALUE || params.colorRgb == Integer.MAX_VALUE) && (params.isBicolorMap || XmlReader.getXmlAttrib(data, "colorMapped").equals("true"))); //next is for information only -- will be superceded by "encoding" attribute of jvxlColorData jvxlData.isJvxlPrecisionColor = XmlReader.getXmlAttrib(data, "precisionColor").equals("true"); @@ -630,7 +630,7 @@ jvxlColorDataRead = JvxlCoder.jvxlUncompressString(XmlReader.getXmlAttrib(data, "data")); if (jvxlColorDataRead.length() == 0) jvxlColorDataRead = xr.getXmlData("jvxlColorData", data, false, false); - jvxlDataIsColorMapped = (params.colorRgb == Integer.MIN_VALUE && jvxlColorDataRead.length() > 0); + jvxlDataIsColorMapped = ((params.colorRgb == Integer.MIN_VALUE || params.colorRgb == Integer.MAX_VALUE) && jvxlColorDataRead.length() > 0); if (haveContourData) jvxlDecodeContourData(jvxlData, xr.getXmlData("jvxlContourData", null, false, false)); } Modified: trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java =================================================================== --- trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java 2011-08-01 23:50:35 UTC (rev 15909) +++ trunk/Jmol/src/org/jmol/jvxl/readers/SurfaceGenerator.java 2011-08-02 00:02:36 UTC (rev 15910) @@ -562,8 +562,11 @@ if ("colorRGB" == propertyName) { int rgb = ((Integer) value).intValue(); params.colorRgb = params.colorPos = params.colorPosLCAO = rgb; - if (colorPtr++ == 0) + if (colorPtr++ == 0) { params.colorNeg = params.colorNegLCAO = rgb; + } else { + params.colorRgb = Integer.MAX_VALUE; + } return true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |