Hello again,<br><br>I've browsed the code, and found this definition of GetShadowColor:<br><br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">void vtkTextProperty::GetShadowColor(double color[3])</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">#if 1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> double average = (this->Color[0] + this->Color[1] + this->Color[2]) / 3.0;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#else</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> double average = (0.30 * this->Color[0] + </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> 0.59 * this->Color[1] + </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> 0.11 * this->Color[2]);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">#endif</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> <b>double shadow_i = average > 0.5 ? 0.0 : 1.0;</b></span><b><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> color[0] = color[1] = color[2] = shadow_i; </span></b><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br></div>
<br>From this code looks like we can infer that the "shadow color" is computed from the "text color" (ie. from the <span style="font-family: courier new,monospace;">vtkProperty::Color[] </span>attribute), that it becomes just black or white, and there is no way to "change" it, as far as I understand.<br>
<br>Regards,<br><br>Frederic Perez<br><br><div class="gmail_quote">On Thu, Jan 14, 2010 at 4:24 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On Thu, Jan 14, 2010 at 10:06 AM, Frederic Perez <<a href="mailto:fredericpcx@gmail.com">fredericpcx@gmail.com</a>> wrote:<br>
> Hello David,<br>
><br>
> probably the key is to retrieve the properties of the text associated with<br>
> the slider and modify it (with ShadowOff).<br>
><br>
> I found this code of mine---perhaps it might help, I'm not sure:<br>
><br>
> void<br>
> SetSomeTextProperties(<br>
> vtkTextProperty* a_pTextProperty,<br>
> size_t a_nTextSize,<br>
> double a_d3TextColor[3])<br>
> {<br>
> if (!a_pTextProperty)<br>
> return;<br>
> a_pTextProperty->SetFontFamilyToArial();<br>
> a_pTextProperty->BoldOff();<br>
> a_pTextProperty->ItalicOff();<br>
> a_pTextProperty->ShadowOff();<br>
> a_pTextProperty->SetFontSize(a_nTextSize);<br>
> // '- Fails to work (?).<br>
> // See <a href="http://markmail.org/message/xyx2y7cdwuj3aw55" target="_blank">http://markmail.org/message/xyx2y7cdwuj3aw55</a><br>
> a_pTextProperty->SetColor(a_d3TextColor);<br>
> a_pTextProperty->SetJustificationToCentered();<br>
> //a_pTextProperty->SetVerticalJustificationToCentered();<br>
> }<br>
><br>
> Regards,<br>
><br>
> Frederic Perez<br>
><br>
> On Thu, Jan 14, 2010 at 3:57 PM, David Doria <<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>><br>
> wrote:<br>
>><br>
>> To change the font color of a slider, I found to do this:<br>
>> sliderRep->GetTitleProperty()->SetColor(1,0,0);//red<br>
>><br>
>> However, as this example demonstrates:<br>
>> <a href="http://www.cmake.org/Wiki/VTK/Examples/Widgets/Cxx/Slider2D" target="_blank">http://www.cmake.org/Wiki/VTK/Examples/Widgets/Cxx/Slider2D</a><br>
>><br>
>> there is a white outline around the red text:<br>
>> <a href="http://www.rpi.edu/%7Edoriad/VTK_List/slider.jpg" target="_blank">http://www.rpi.edu/~doriad/VTK_List/slider.jpg</a><br>
>><br>
>> Anyone know how to remove the outline and simply make the text red?<br>
>><br>
>> Thanks,<br>
>><br>
>> David<br>
<br>
</div></div>Ah, that did the trick, thanks Frederic.<br>
<br>
However, in vtkTextProperty, I see GetShadowColor(), but no<br>
SetShadowColor(). Is there a way to change the shadow color to a color<br>
that makes sense rather than simply turn it off?<br>
<div><div></div><div class="h5"><br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>