From: Michael T H. <mic...@us...> - 2004-03-28 18:01:38
|
Update of /cvsroot/jmol/Jmol/src/org/openscience/jmol/viewer/g3d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30128/src/org/openscience/jmol/viewer/g3d Modified Files: Graphics3D.java Log Message: more work on hover Index: Graphics3D.java =================================================================== RCS file: /cvsroot/jmol/Jmol/src/org/openscience/jmol/viewer/g3d/Graphics3D.java,v retrieving revision 1.71 retrieving revision 1.72 diff -u -r1.71 -r1.72 --- Graphics3D.java 25 Mar 2004 18:00:59 -0000 1.71 +++ Graphics3D.java 28 Mar 2004 17:49:49 -0000 1.72 @@ -292,19 +292,25 @@ public void drawRect(short colix, int x, int y, int width, int height) { argbCurrent = getArgb(colix); - int xRight = x + width; + int xRight = x + width - 1; drawLine(x, y, 0, xRight, y, 0); - int yBottom = y + height; + int yBottom = y + height - 1; drawLine(x, y, 0, x, yBottom, 0); - drawLine(x, yBottom, 0, xRight, yBottom, 0); drawLine(xRight, y, 0, xRight, yBottom, 0); + drawLine(x, yBottom, 0, xRight + 1, yBottom, 0); } public void drawString(String str, short colix, int xBaseline, int yBaseline, int z) { + drawString(str, font3dCurrent, colix, xBaseline, yBaseline, z); + } + + public void drawString(String str, Font3D font3d, short colix, + int xBaseline, int yBaseline, int z) { + font3dCurrent = font3d; + argbCurrent = getArgb(colix); if (z < slab) return; - argbCurrent = getArgb(colix); Text3D.plot(xBaseline, yBaseline - font3dCurrent.fontMetrics.getAscent(), z, argbCurrent, str, font3dCurrent, this); } @@ -603,7 +609,9 @@ hermite3d.render(false, colix, tension, 0, 0, 0, s0, s1, s2, s3); } - public void fillRect(int x, int y, int z, int widthFill, int heightFill) { + public void fillRect(short colix, + int x, int y, int z, int widthFill, int heightFill) { + argbCurrent = getArgb(colix); if (x < 0) { widthFill += x; if (widthFill <= 0) @@ -623,8 +631,8 @@ } if (y + heightFill > height) heightFill = height - y; - while (--height >= 0) - plotPixelsUnclipped(width, x, y++, z, false); + while (--heightFill >= 0) + plotPixelsUnclipped(widthFill, x, y++, z, false); } public void drawPixel(Point3i point) { @@ -1064,6 +1072,7 @@ Font3D.FONT_STYLE_PLAIN, fontSize); } + // {"Plain", "Bold", "Italic", "BoldItalic"}; public Font3D getFont3D(String fontFace, String fontStyle, int fontSize) { return Font3D.getFont3D(platform, Font3D.getFontFaceID(fontFace), Font3D.getFontStyleID(fontStyle), fontSize); |