[Chimera-users] 2dlabels with solid background

Tom Goddard goddard at sonic.net
Mon Nov 21 10:57:52 PST 2011

Hi Gabe,

   Unfortunately there is no color key command.  Here's another creative 
solution.  Make the label background be another label using unicode squares.

     2dlabels create b1 text '\u2588\u2588\u2588' color white xpos .5 
ypos .7 size 64

This uses the square unicode character, hexadecimal 2588.  This solution 
has the advantage that you can fade out this background together with 
the label.  In order for the text label to appear on top of background 
label you have to create the text label after creating the background.  
I'd recommend making all the labels and backgrounds interactive with the 
2dlabel dialog and saving them in a session which you use together with 
your movie script.   The script will show and hide the labels that have 
already been made, sized, positioned.  You can cut and paste the unicode 
square character, say from web page into the 2dlabel dialog.


This solution doesn't make it easy to make an outline around the 
background box.  Elaine suggested that you just make another slightly 
bigger background in the outline color.  That has the problem that the 
vertical outline edges are thicker than the horizontal ones if the the 
background is wider than it is tall.  To get uniform thickness outline 
you could make two extra background boxes one square shorter than the 
normal background and slide them horizontally them to get vertical 
outline edges of equal thickness.


-------- Original Message --------
Subject: 2dlabels
From: Gabriel Lander
To: Tom Goddard
Date: 11/19/11 6:59 PM
> Hi Tom,
> Again thanks for the volume tracer settings saver - it's been super helpful.
> But now I have another question:
> I'm currently making a movie that uses lots of labels, and for the most part the current 2dlabels create&  acreate commands work really well.  But for certain closeup views the text gets lost in the volume density, and I've been trying to figure out a way to get a box to show up behind the labels (like in the attached image).  I've figured out I can get something like this if I use the "color key" option, and then offset the text to fit inside the box, but I can't find a "color key" chimera command that I can put it into my movie script.
> I tried using the "shape rectangle" command, but it's a bit too tedious to position the rectangles exactly right for all the labels.
> Any ideas?
> -gabe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20111121/b95a24c0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 335763 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20111121/b95a24c0/attachment.png>

More information about the Chimera-users mailing list