0030991: Draw Harness - ViewerTest::ParseColor() defines out-of-range alpha component
authorkgv <kgv@opencascade.com>
Sat, 21 Sep 2019 14:10:23 +0000 (17:10 +0300)
committerbugmaster <bugmaster@opencascade.com>
Tue, 24 Sep 2019 10:52:45 +0000 (13:52 +0300)
commit9196ea9d5ad4190294cff17c67ccdfdba3ee6f1b
tree7c4c66112a2bcea81809147da329b3e038d58a51
parentd537c5e67db84ec42326208ca373acd4261bf31d
0030991: Draw Harness - ViewerTest::ParseColor() defines out-of-range alpha component

ViewerTest::ParseColor() - fixed alpha component defined as 255 for RGB-only input.
Quantity_Color::ColorToHex() now rounds-up float values to closest integer.
Quantity_ColorRGBA::ColorToHex() - added method formatting color into hex with alpha component consistent to Quantity_Color::ColorToHex() for RGB.

vdrawtext command now uses ViewerTest::ParseColor() for parsing color argument, so that it accepts hex.
vreadpixel command now has been extended with -hex argument for printing color in hex format.

Commands XSetColor, XGetColor, XGetShapeColor, XGetAllColors, XAddColor, XRemoveColor, XFindColor,
XUnsetColor, XGetInstanceColor, XSetInstanceColor have been corrected to properly report syntax input errors
and to accept color names and hex (by reusing ViewerTest::ParseColor()).
samples/tcl/materials.tcl
samples/tcl/pathtrace_ball.tcl
samples/tcl/pathtrace_cube.tcl
samples/tcl/pathtrace_materials.tcl
src/Image/Image_AlienPixMap.cxx
src/Quantity/Quantity_Color.hxx
src/Quantity/Quantity_ColorRGBA.hxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/XDEDRAW/XDEDRAW_Colors.cxx