From: <ha...@us...> - 2008-08-27 16:28:00
|
Revision: 9776 http://jmol.svn.sourceforge.net/jmol/?rev=9776&view=rev Author: hansonr Date: 2008-08-27 16:27:57 +0000 (Wed, 27 Aug 2008) Log Message: ----------- version=11.6.RC11 # bug fix: super/subscripts with antialiasdisplay Modified Paths: -------------- trunk/Jmol/src/org/jmol/g3d/Text3D.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/g3d/Text3D.java =================================================================== --- trunk/Jmol/src/org/jmol/g3d/Text3D.java 2008-08-27 15:50:01 UTC (rev 9775) +++ trunk/Jmol/src/org/jmol/g3d/Text3D.java 2008-08-27 16:27:57 UTC (rev 9776) @@ -78,6 +78,7 @@ JmolRendererInterface jmolRenderer, boolean antialias) { if (text.length() == 0) return 0; + System.out.println(x + " " + y + " " + text); if (text.indexOf("<su") >= 0) return plotByCharacter(x, y, z, argb, text, font3d, g3d, jmolRenderer, antialias); @@ -95,6 +96,7 @@ int textWidth = text3d.width; int textHeight = text3d.height; int mapWidth = text3d.mapWidth; + System.out.println ("mapWidth = " + mapWidth); if (x + textWidth <= 0 || x >= g3d.width || y + textHeight <= 0 || y >= g3d.height) return textWidth; @@ -199,11 +201,11 @@ int len = text.length(); int suboffset = (int)(font3d.fontMetrics.getHeight() * 0.25); int supoffset = -(int)(font3d.fontMetrics.getHeight() * 0.3); - if (antialias) { +/* if (antialias) { suboffset <<= 1; supoffset <<= 1; } - for (int i = 0; i < len; i++) { +*/ for (int i = 0; i < len; i++) { if (text.charAt(i) == '<') { if (i + 4 < len && text.substring(i, i + 5).equals("<sub>")) { i += 4; @@ -226,9 +228,13 @@ continue; } } - w += plot(x + w, y, z, argb, text.substring(i, i + 1), font3d, + int width = plot(x + w, y, z, argb, text.substring(i, i + 1), font3d, g3d, jmolRenderer, antialias); + if (antialias) // this is a hack + width >>= 1; + w += width; } + System.out.println("w=" + w); return w; } Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2008-08-27 15:50:01 UTC (rev 9775) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2008-08-27 16:27:57 UTC (rev 9776) @@ -3,8 +3,8 @@ version=11.6.RC11 +# bug fix: super/subscripts with antialiasdisplay # translation: menu items in console - # bug fix: web export / language # bug fix: draw pointgroup C2 2 not distinguished from draw pointgroup C2 1 # bug fix: d2 point groups cause null pointer exception due to missing principal axis This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |