From: <ha...@us...> - 2007-10-29 22:38:04
|
Revision: 8542 http://jmol.svn.sourceforge.net/jmol/?rev=8542&view=rev Author: hansonr Date: 2007-10-29 15:37:58 -0700 (Mon, 29 Oct 2007) Log Message: ----------- version=11.3.40_dev # bug fix: draw object text not selective for frame # new feature: draw object title line number corresponds to model number for multi-model draw objects Modified Paths: -------------- trunk/Jmol/src/org/jmol/shape/MeshRenderer.java trunk/Jmol/src/org/jmol/shapespecial/DrawRenderer.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/shape/MeshRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shape/MeshRenderer.java 2007-10-29 22:23:12 UTC (rev 8541) +++ trunk/Jmol/src/org/jmol/shape/MeshRenderer.java 2007-10-29 22:37:58 UTC (rev 8542) @@ -68,7 +68,9 @@ slabbing = viewer.getSlabEnabled(); vertices = mesh.vertices; //because DRAW might have a text associated with it colix = mesh.colix; - if (mesh == null || mesh.visibilityFlags == 0 || (vertexCount = mesh.vertexCount) == 0) + if (mesh == null || mesh.visibilityFlags == 0 + || (vertexCount = mesh.vertexCount) == 0 + || mesh.polygonCount == 0) return false; normixes = mesh.normixes; if (normixes == null || vertices == null) Modified: trunk/Jmol/src/org/jmol/shapespecial/DrawRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/shapespecial/DrawRenderer.java 2007-10-29 22:23:12 UTC (rev 8541) +++ trunk/Jmol/src/org/jmol/shapespecial/DrawRenderer.java 2007-10-29 22:37:58 UTC (rev 8542) @@ -170,16 +170,21 @@ } private void renderInfo() { - if (mesh.title == null || mesh.title[0].length() == 0 || viewer.getDrawHover() + if (mesh.title == null || viewer.getDrawHover() || !g3d.setColix(viewer.getColixBackgroundContrast())) return; - //just the first line of the title -- nothing fancy here. - byte fid = g3d.getFontFid("SansSerif", 14); - g3d.setFont(fid); - viewer.transformPoint(vertices[0], pt1i); - int offset = (antialias ? 10 : 5); - g3d.drawString(mesh.title[0], null, pt1i.x + offset, pt1i.y - offset, - pt1i.z, pt1i.z); + for (int i = dmesh.polygonCount; --i >= 0;) + if (isPolygonDisplayable(i)) { + //just the first line of the title -- nothing fancy here. + byte fid = g3d.getFontFid("SansSerif", 14); + g3d.setFont(fid); + viewer.transformPoint(vertices[dmesh.polygonIndexes[i][0]], pt1i); + int offset = (antialias ? 10 : 5); + g3d.drawString(mesh.title[i < mesh.title.length ? i + : mesh.title.length - 1], null, pt1i.x + offset, pt1i.y - offset, + pt1i.z, pt1i.z); + break; + } } } Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2007-10-29 22:23:12 UTC (rev 8541) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2007-10-29 22:37:58 UTC (rev 8542) @@ -1,5 +1,8 @@ version=11.3.40_dev +# bug fix: draw object text not selective for frame +# new feature: draw object title line number corresponds to model number for multi-model draw objects + # new feature: matte finish for isosurfaces # bug fix: noninteger MO occupancies This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |