That's fixed now for 11.2.1 and 11.3.0.

Apparently draw text+translucency was never tested. I'll change the 
documentation to match.

 draw text1 {3 4 5} "some text"

will display a simple text message (not multiline; just colored to 
contrast with the background) next to the first vertex of a draw object. 
This text will appear at all times if the default "set drawHover OFF" is 
in effect, even if the draw object itself is invisible due to setting 
its color to "translucent 1". If one has set drawHover ON, then the text 
will only appear when the user hovers over one of the points associated 
with the draw object.

If more complex, colored, or translucent text is desired, use ECHO instead:

 set echo myecho {3 4 5}
 echo "some | more complex | text"
 color echo translucent white



Bob


Rolf Huehne wrote:

>Rolf Huehne wrote:
>  
>
>>Bob Hanson wrote:
>>  
>>    
>>
>>>Oops, that's a bug.... That is supposed to be the behavior for 2D text.
>>>
>>>In the mean time, you can use:
>>>
>>>draw text1 {3 4 5} "some text label" translucent 1
>>>
>>>That is, create a point, label it with some text, and display it as 
>>>"invisible". Then you can turn the text on and off using
>>>
>>>draw text1 on
>>>draw text1 off
>>>
>>>  
>>>    
>>>      
>>>
>>Thank you for this tip!
>>
>>>From the documentation of the "draw" command ("hoverText": text that
>>will appear after issuing set drawHover TRUE (Jmol 11.1)) I expected the
>>text to appear only if the mouse rests over the draw object. Because
>>that wouldn't help me much, I didn't even tested it.
>>
>>But the text  appears (fortunately) directly after the definition and I
>>couldn't observe any difference after changing "set drawHover".
>>
>>So it looks as if I could use it directly to label planes. And to switch
>>the label off, just redefine the plane without the text.
>>
>>When I tried the example 'draw text1 {3 4 5} "some text label"
>>translucent 1' I got the following Java error with Jmol 11.2.0 (SuSE
>>Linux 9.3, Java 1.4.2_13, Firefox 1.5.0.10) and the applet doesn't
>>refresh the window any more:
>>java.lang.NullPointerException
>>    at org.jmol.shapespecial.DrawRenderer.renderInfo(Unknown Source)
>>    at org.jmol.shapespecial.DrawRenderer.render(Unknown Source)
>>    at org.jmol.shape.ShapeRenderer.render(Unknown Source)
>>    at org.jmol.viewer.FrameRenderer.render(Unknown Source)
>>    at org.jmol.viewer.RepaintManager.render(Unknown Source)
>>    at org.jmol.viewer.Viewer.getImage(Unknown Source)
>>    at org.jmol.viewer.Viewer.renderScreenImage(Unknown Source)
>>    at org.jmol.applet.Jmol.update(Unknown Source)
>>    at org.jmol.applet.Jmol.update(Unknown Source)
>>    at org.jmol.appletwrapper.AppletWrapper.update(Unknown Source)
>>    at sun.awt.RepaintArea.paint(RepaintArea.java:169)
>>    at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:405)
>>    at java.awt.Component.dispatchEventImpl(Component.java:3678)
>>    at java.awt.Container.dispatchEventImpl(Container.java:1627)
>>    at java.awt.Component.dispatchEvent(Component.java:3477)
>>    at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
>>    at
>>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
>>    at
>>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
>>    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
>>    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
>>    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
>>
>>But this error seems to occur only if this is the first draw command
>>issued. If I start with 'draw text1 {3 4 5} "some text label"' first and
>>then add 'translucent 1' in a second command, no Java error occurs.
>>
>>  
>>    
>>
>I noticed a strange behaviour of the text shown by the draw command.
>
>If I issue the following two commands after loading PDB entry '1DEH',
>everything seems to work fine:
>
>draw border1 PERP 150 PLANE (5:A.CA) (6:A.CA) "Exon 1/2";
>draw border2 PERP 150 PLANE (7:A.CA) (8:A.CA) "Exon 2/3";
>
>The planes appear in the right places and also the labelling text. I can
>switch each one on and off  (e.g.: 'draw border1 on' and 'draw border1
>off') and everything looks fine.
>
>But if I add translucent to the modifier list, the labelling texts get
>mixed up:
>
>draw border1 PERP 150 PLANE (5:A.CA) (6:A.CA) "Exon 1/2" translucent;
>draw border2 PERP 150 PLANE (7:A.CA) (8:A.CA) "Exon 2/3" translucent;
>
>The text of 'border2' appears at the same coordinates as the text of
>'border1'.
>If I then switch off 'border1', the text of 'border1' disappears and the
>text of 'border2' remains at the wrong position.
>If I know switch 'border1' on again, both texts appear now at the
>coordinates for 'border2' (and the text of 'border2' disappears at the
>coordinates for 'border1').
>
>The same happens if I add the 'translucent' in a second command without
>redefining the coordinates and the text: 'draw border1 translucent'.
>
>Regards,
>Rolf
>
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by DB2 Express
>Download DB2 Express C - the FREE version of DB2 express and take
>control of your XML. No limits. Just data. Click to get it now.
>http://sourceforge.net/powerbar/db2/
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get. 

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to