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

0031709: Draw Harness - move methods ViewerTest::ParseOnOff()/ParseColor() to package Draw

Methods ParseOnOff()/ParseColor() have been moved from package ViewerTest to Draw.
Command "vlight -color" now accepts RGB values, not only name.
Implementation of pload command has been cleaned up.
This commit is contained in:
kgv
2020-08-12 15:58:22 +03:00
committed by bugmaster
parent 76fada6839
commit dae2a92241
14 changed files with 851 additions and 774 deletions

View File

@@ -399,7 +399,17 @@ static int ParseDimensionParams (Standard_Integer theArgNum,
}
else if (aParam.IsEqual ("-color"))
{
theAspect->SetCommonColor (Quantity_Color (ViewerTest::GetColorFromName (theArgVec[++anIt])));
Quantity_Color aColor;
Standard_Integer aNbParsed = Draw::ParseColor (theArgNum - anIt - 1,
theArgVec + anIt + 1,
aColor);
anIt += aNbParsed;
if (aNbParsed == 0)
{
Message::SendFail() << "Error: wrong syntax at '" << aParam << "'";
return 1;
}
theAspect->SetCommonColor (aColor);
}
else if (aParam.IsEqual ("-extension"))
{