[vtkusers] Border line color of vtkTextWidget

John Anaia john.anaia at gmail.com
Wed Jul 2 02:47:35 EDT 2014


I followed this example to add a vtkTextWidget:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Widgets/TextWidget

Everything worked fine. However, the rectangular border lines are white by
default. However, my render window has a white background color. So the
white textWidget border is not visible. I tried to change the border line
color into black with this statement:
textWidget->GetBorderRepresentation()->GetBorderProperty()->SetColor(0.,
0., 0.);

But I kept getting this error message:
error C2039: 'GetBorderRepresentation' : is not a member of 'vtkTextWidget'

FYI, I am using vtk 5.8 and included the proper headers such as:
#include <vtkTextWidget.h>
#include <vtkTextRepresentation.h>
#include <vtkCoordinate.h>
#include <vtkBorderRepresentation.h>
#include <vtkBorderWidget.h>

I'd like to have your assistance to change the color of vtkTextWidget
border lines.

Thank you for your help,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140701/f0e8649a/attachment.html>


More information about the vtkusers mailing list