1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

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()).
This commit is contained in:
kgv
2019-09-21 17:10:23 +03:00
committed by bugmaster
parent d537c5e67d
commit 9196ea9d5a
11 changed files with 540 additions and 321 deletions

View File

@@ -86,3 +86,4 @@ drawObjects 0 ""
drawObjects 1 red
drawObjects 2 green
drawObjects 3 blue1
vrepaint

View File

@@ -75,4 +75,4 @@ vrenderparams -ray -gi -rayDepth 10
puts "Make several path tracing iterations to refine the picture, please wait..."
vfps 100
puts "Done. To improve the image further, or after view manipulations, give command:"
puts "vfps \[nb_iteratons\]"
puts "vfps \[nb_iteratons\] or vrepaint -continuous"

View File

@@ -85,4 +85,4 @@ vrenderparams -ray -gi -rayDepth 8
puts "Make several path tracing iterations to refine the picture, please wait..."
vfps 100
puts "Done. To improve the image further, or after view manipulations, give command:"
puts "vfps \[nb_iteratons\]"
puts "vfps \[nb_iteratons\] or vrepaint -continuous"

View File

@@ -223,4 +223,4 @@ vrenderparams -ray -gi -rayDepth 10
puts "Make several path tracing iterations to refine the picture, please wait..."
vfps 512
puts "Done. To improve the image further, or after view manipulations, give command:"
puts "vfps \[nb_iteratons\]"
puts "vfps \[nb_iteratons\] or vrepaint -continuous"