[vtk-developers] Interest in a vtkColor class?
Andrew Maclean
a.maclean at cas.edu.au
Sun Mar 20 17:31:51 EST 2005
Hi All,
Is there any interest in a vtkColor class?
If so I would be happy to write one.
I envisage using the colour names in colors.tcl and having a function like:
GetColor("red"); returning a float[3]. Most likely I would use a map as the
underlying structure so that we could have a function like
InsertColor(name,r,g,b); Thus users could add to the existing colour table.
I just find it frustrating that when using TCL I can easily specify a colour
but I can't do this in C++.
It would be nice to have something like:
actor->GetProperty()->SetColor(color->GetColor("antique_white"));
Of course local defines could be used but I think having a colour class
along with the ability to add more colours as you want may be a better
solution. I also want to keep the well known colour names without decorating
them, hence the syntax above.
Andrew
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney 2006 NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.cas.edu.au/
___________________________________________
More information about the vtk-developers
mailing list