]> OCCT Git - occt-copy.git/commit
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)
committerkgv <kgv@opencascade.com>
Sat, 21 Sep 2019 17:40:58 +0000 (20:40 +0300)
commitd254c6f9ad1b1ad5711da455d0d979db4926a3e1
treeef59a4cc8c71606d3152766c93c14fc936f05517
parent258a844b63a2cca59043dd33eab09e4b588fd8bc
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