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

0028726: Quantity_NameOfColor should be replaced by Quantity_Color in function input argument

AIS_InteractiveObject, virtual methods ::SetColor(), ::Color()
returning/accepting Quantity_NameOfColor have been removed.
Virtual method ::SetMaterial() accepting Graphic3d_NameOfMaterial has been also removed.

V3d_View, V3d_Viewer, V3d_AmbientLight, V3d_DirectionalLight,
V3d_Light, V3d_PositionalLight, V3d_SpotLight, Aspect_Window,
methods accepting Quantity_NameOfColor have been removed (duplicates)
or color argument(s) replaced with Quantity_Color.
This commit is contained in:
kgv
2017-05-11 18:10:53 +03:00
committed by bugmaster
parent 5ecc46c08e
commit 87432b8278
71 changed files with 426 additions and 1585 deletions

View File

@@ -259,12 +259,12 @@ void OCC_3dBaseDoc::OnObjectColor()
{
Handle(AIS_InteractiveObject) Current ;
COLORREF MSColor ;
Quantity_Color CSFColor ;
myAISContext->InitSelected();
Current = myAISContext->SelectedInteractive();
if ( Current->HasColor () ) {
CSFColor = myAISContext->Color(Current);
Quantity_Color CSFColor;
myAISContext->Color (Current, CSFColor);
MSColor = RGB (CSFColor.Red()*255.,CSFColor.Green()*255.,CSFColor.Blue()*255.);
}
else {
@@ -275,10 +275,9 @@ void OCC_3dBaseDoc::OnObjectColor()
if (dlgColor.DoModal() == IDOK)
{
MSColor = dlgColor.GetColor();
CSFColor = Quantity_Color (GetRValue(MSColor)/255.,GetGValue(MSColor)/255.,
GetBValue(MSColor)/255.,Quantity_TOC_RGB);
Quantity_Color CSFColor (GetRValue(MSColor)/255., GetGValue(MSColor)/255., GetBValue(MSColor)/255., Quantity_TOC_RGB);
for (;myAISContext->MoreSelected ();myAISContext->NextSelected ())
myAISContext->SetColor (myAISContext->SelectedInteractive(),CSFColor.Name(), Standard_False);
myAISContext->SetColor (myAISContext->SelectedInteractive(), CSFColor, Standard_False);
myAISContext->UpdateCurrentViewer();
}
}