[vtkusers] Change background-color of rendering window

Marc Cotran marc at cotran.ca
Wed Sep 6 13:32:22 EDT 2006


Rashed Karim wrote:
> Hi Marc,
>
> Thanks for your reply. I tried using the SetBackground function but 
> whatever color (r,g,b) i set it to, always produces the white 
> background. Any ideas as to why ? 
I'm guessing you are using integer values above 1 and they are being 
clamped to 1 for r,g,b. VTK works with doubles from 0.0 to 1.0. For 
example, to set background color to blue, you would say:

SetBackground(0.0, 0.0, 1.0);

hth

Marc



More information about the vtkusers mailing list