[vtkusers] How do I change color of vtkCubeAxesActor2D axes?
Amy Henderson
amy.henderson at kitware.com
Wed Jan 7 08:54:17 EST 2004
Hi Maynard,
For actors in VTK, color is handled by a property object. The code (in
C++) to change the color of a cube axes actor to red is as follows:
vtkCubeAxesActor2D *cube = vtkCubeAxesActor2D::New();
cube->GetProperty()->SetColor(1, 0, 0);
If you want to change the color of the axis titles or labels, this is also
handled through properties. To get the property you call
GetAxisTitleTextProperty or GetAxisLabelTextProperty, respectively.
- Amy
At 06:58 PM 1/6/2004 -0700, Maynard Brandsma wrote:
>Hi:
>I'm a new VTK user. After reading through the 3rd edition VTK book and
>the version 4.2 user's guide, I can't figure out how to change the color
>of a vtkCubeAxesActor2D object to black from the default
>white. vtkCubeAxesActor2D does not have a "SetAxesColor" method. I'm
>hoping someone can direct me to the appropriate documentation or provide a
>code example. Thanks in advance.
>
>Maynard Brandsma
>Brandsma Engineering
>Mailing address: P.O. Box 378, Durango CO 81302
>Street address: 102 E. Eighth Street, Suite 203, Durango, CO 81301
>Telephone/Fax: 970.259.3487
>E-mail: BrandsmaMG at compuserve.com
>
>
>_______________________________________________
>This is the private VTK discussion list. Please keep messages on-topic.
>Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list