[vtkusers] Why does VTK use doubles for color?
David Doria
daviddoria+vtk at gmail.com
Tue Sep 7 13:42:26 EDT 2010
Is there a reason that unsigned chars are not used for all things related to
color? For example
vtkProperty::SetColor(double,double,double) //expects values from 0.0 to 1.0
http://www.vtk.org/doc/nightly/html/classvtkProperty.html#aa591fc54d4e2d21e2c7a97ef7cd2a993
vtkViewPort::SetBackground(double,double,double) //expects values from 0.0
to 1.0
<http://www.vtk.org/doc/nightly/html/classvtkProperty.html#aa591fc54d4e2d21e2c7a97ef7cd2a993>
http://www.vtk.org/doc/nightly/html/classvtkViewport.html#a85eaf3ee2b0e49423efbaa41de17112d
Wouldn't it be more natural to define these as
vtkProperty::SetColor(unsigned char,unsigned char,unsigned char) //expects
values from 0 to 255
vtkViewPort::SetBackground(unsigned char,unsigned char,unsigned
char) //expects values from 0 to 255
?
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100907/41950484/attachment.htm>
More information about the vtkusers
mailing list