[vtk-developers] Interest in a vtkColor class?

Andrew Maclean a.maclean at cas.edu.au
Tue Mar 22 17:00:37 EST 2005


Ok.

Andrew



-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com] 
Sent: Wednesday, 23 March 2005 00:17
To: Andrew Maclean
Cc: 'Mathieu Malaterre'; vtk-developers at vtk.org
Subject: Re: [vtk-developers] Interest in a vtkColor class?

Andrew Maclean wrote:
> Thanks for your comments. I just wanted something in a class that doesn't
> add a whole mass of static variables and also gives the user the ability
to
> add new colours to their tables. The values of the colours won't change in
> the map but the user can add new colours or delete if they want. Someone
> might want "alizarin purple"!
> 
> If no-one thinks this is of any use and maybe my solution is probably a
bit
> too sophisticated, could we perhaps just rename vtkTestingColors.h to say
> vtkColors.h and move it into Commmon? This would be quite useful. I would
be
> quite happy with this approach. 
> 
> This has just been motivated because I like to be able to set the same
> colours in the TCL scripts and in the C++ code. Also when given an option
> for colours, users often remember names better. I have a colour combo-box
in
> windows that lets the user select a named colour patch or make their own
> colour. Hence the motivation for a map of colours keyed by name.

Having a vtkColor generation class is certainly a reasonable idea.  If 
you implement one please post the interface to this list for 
comments/discussion.  Once it is finished you can submit a feature 
request here:

http://www.vtk.org/Bug

and then go back in and add the source files to the report.

-Brad





More information about the vtk-developers mailing list