occt: master 9196ea9d

Author Committer Branch Timestamp Parent
kgv bugmaster master 2019-09-21 14:10:23 master d537c5e6
Affected Issues  0030991: Draw Harness - ViewerTest::ParseColors() defines out-of-range alpha component
Changeset 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()).
mod - samples/tcl/materials.tcl Diff File
mod - samples/tcl/pathtrace_ball.tcl Diff File
mod - samples/tcl/pathtrace_cube.tcl Diff File
mod - samples/tcl/pathtrace_materials.tcl Diff File
mod - src/Image/Image_AlienPixMap.cxx Diff File
mod - src/Quantity/Quantity_Color.hxx Diff File
mod - src/Quantity/Quantity_ColorRGBA.hxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - src/XDEDRAW/XDEDRAW_Colors.cxx Diff File