X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_AISObject.cpp;h=aea1179d62076fc4aaddd0a1c44f53950acf8787;hb=60e95a5502a6940c6c27ce5d561b3c684b0b0a4f;hp=24e07eb08d732dc33fc6394067aacc08d967c31a;hpb=a3cd8f27f76183cfc2d0728e6388696ab9dce1b8;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_AISObject.cpp b/src/GeomAPI/GeomAPI_AISObject.cpp index 24e07eb08..aea1179d6 100644 --- a/src/GeomAPI/GeomAPI_AISObject.cpp +++ b/src/GeomAPI/GeomAPI_AISObject.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -252,6 +253,14 @@ void GeomAPI_AISObject::createFixed(std::shared_ptr theShape, } } +void GeomAPI_AISObject::redisplay() +{ + Handle(AIS_InteractiveObject) anAIS = impl(); + if (!anAIS.IsNull()) { + Handle(AIS_InteractiveContext) aContext = anAIS->GetContext(); + aContext->Redisplay(anAIS, false); + } +} void GeomAPI_AISObject::setColor(const int& theColor) @@ -273,6 +282,7 @@ void GeomAPI_AISObject::setWidth(const double& theWidth) if (anAIS.IsNull()) return; anAIS->SetWidth(theWidth); + anAIS->Redisplay(); } void GeomAPI_AISObject::setColor(int theR, int theG, int theB) @@ -336,9 +346,16 @@ void GeomAPI_AISObject::setLineStyle(int theStyle) aDrawer->LineAspect()->SetTypeOfLine((Aspect_TypeOfLine)theStyle); if (aDrawer->HasWireAspect()) aDrawer->WireAspect()->SetTypeOfLine((Aspect_TypeOfLine)theStyle); - //else { - // Quantity_NameOfColor aCol = Quantity_NOC_RED; - // aDrawer->SetLineAspect(new Prs3d_LineAspect(aCol, (Aspect_TypeOfLine)theStyle, 1)); - //} + } +} + + +void GeomAPI_AISObject::setTransparensy(double theVal) +{ + Handle(AIS_InteractiveObject) anAIS = impl(); + if (!anAIS.IsNull()) { + Handle(AIS_InteractiveContext) aContext = anAIS->GetContext(); + if (!aContext.IsNull()) + aContext->SetTransparency(anAIS, theVal, false); } }