[vtkusers] How do I change color of vtkCubeAxesActor2D axes?

Christopher M. Navarro cnavarro at ncsa.uiuc.edu
Tue Jan 6 21:25:59 EST 2004


Hi Maynard,

The vtkCubeAxesActor provides some methods to get at the pieces 
controlling the properties of the object.  For instance, you can change 
the color of the axes by doing:

axesActor->GetProperty()->SetColor(0.0, 0.0, 0.0);

You can access the text properties similarly with:

axesActor->GetAxisLabelTextProperty()->SetColor(...);

You will need to look at the vtk documentation to see what methods are 
available and then look at the returned objects documentation...for 
instance the GetAxisLabelTextProperty returns a vtkTextProperty so you 
will need to find out what methods that object has available, and so 
forth.  Hope that helps.

regards,

chris

On Tue, 6 Jan 2004, 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