[vtkusers] vtkProperty , color setting problem

Shady Shidfar shady_shidfar at yahoo.com
Wed Jul 30 10:19:24 EDT 2008


Hi Everyone,
I'm having a wierd problem with vtkProperty. I create a line and specify a color for it. The problem is that some (actually most) RGB values I pass to vtkProperty won't generate the related colour. say for example slateblue identified by R=147, G=112 and B=219 (http://www.ecrion.com/Support/Resources/XSL-FOTutorial/ApendixA.xml.html) appears as white?????!!!!!!! and it's not only that color. Can someone tell me what's the solution the create any RGB color. Here's my code:
vtk.vtkLineSourceline = newvtkLineSource();line.SetPoint1(0.0, 0.0, 0.0);line.SetPoint2(50, 50, 0.0);vtkPolyDataMappermapper = newvtkPolyDataMapper();vtkActorlineActor = newvtkActor();
lineActor.SetMapper(mapper);
//set line propertiesvtkPropertyproperty = newvtkProperty();property.SetColor(147.0, 112.0, 219.0);lineActor.SetProperty(property);
mapper.SetInput(line.GetOutput());


      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080730/8c8f0638/attachment.htm>


More information about the vtkusers mailing list