theScript += aCommand.ToCString();
}
- SALOMEDS::Color aColor = obj->GetColor();
+ GEOM_Object::Color aColor = obj->GetColor();
if ( aColor.R >= 0 && aColor.G >= 0 && aColor.B >= 0 )
{
TCollection_AsciiString aCommand( "\n\t" );
* SetColor
*/
//=============================================================================
-void GEOM_Object::SetColor(const SALOMEDS::Color& theColor)
+void GEOM_Object::SetColor(const GEOM_Object::Color& theColor)
{
Handle(TDataStd_RealArray) anArray = new TDataStd_RealArray();
anArray->Init( 1, 3 );
* GetColor
*/
//=============================================================================
-SALOMEDS::Color GEOM_Object::GetColor()
+GEOM_Object::Color GEOM_Object::GetColor()
{
Handle(TDataStd_RealArray) anArray;
bool isFound = _label.FindChild(COLOR_LABEL).FindAttribute(TDataStd_RealArray::GetID(), anArray);
- SALOMEDS::Color aColor;
+ GEOM_Object::Color aColor;
aColor.R = isFound ? anArray->Value( 1 ) : -1;
aColor.G = isFound ? anArray->Value( 2 ) : -1;
aColor.B = isFound ? anArray->Value( 3 ) : -1;
* SetAutoColor
*/
//=============================================================================
-void GEOM_Object::SetAutoColor(CORBA::Boolean theAutoColor)
+void GEOM_Object::SetAutoColor(bool theAutoColor)
{
TDataStd_Integer::Set(_label.FindChild(AUTO_COLOR_LABEL), (int)theAutoColor);
}
* GetAutoColor
*/
//=============================================================================
-CORBA::Boolean GEOM_Object::GetAutoColor()
+bool GEOM_Object::GetAutoColor()
{
Handle(TDataStd_Integer) anAutoColor;
if(!_label.FindChild(AUTO_COLOR_LABEL).FindAttribute(TDataStd_Integer::GetID(), anAutoColor)) return false;
- return anAutoColor->Get();
+ return bool(anAutoColor->Get());
}
//=============================================================================
#include <Aspect_TypeOfMarker.hxx>
#endif
-#include "SALOMEconfig.h"
-#include CORBA_SERVER_HEADER(SALOMEDS)
-#include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
class Handle_TColStd_HSequenceOfTransient;
class Standard_Transient;
class GEOM_Object : public MMgt_TShared
{
friend class GEOM_Engine;
+
+ public:
+ struct Color {
+ //! Red component of the color
+ double R;
+ //! Green component of the color
+ double G;
+ //! Blue component of the color
+ double B;
+ };
public:
inline void* operator new(size_t,void* anAddress)
Standard_EXPORT char* GetName();
//Sets a color of this GEOM_Object
- Standard_EXPORT void SetColor(const SALOMEDS::Color& theColor);
+ Standard_EXPORT void SetColor(const Color& theColor);
//Returns a color of this GEOM_Object
- Standard_EXPORT SALOMEDS::Color GetColor();
+ Standard_EXPORT Color GetColor();
//Toggles an auto color mode on this GEOM_Object
- Standard_EXPORT void SetAutoColor(CORBA::Boolean theAutoColor);
+ Standard_EXPORT void SetAutoColor(bool theAutoColor);
//Returns a flag of auto color mode of this GEOM_Object
- Standard_EXPORT CORBA::Boolean GetAutoColor();
+ Standard_EXPORT bool GetAutoColor();
//Sets predefined point marker texture
Standard_EXPORT void SetMarkerStd(const Aspect_TypeOfMarker theType, double theSize);
TCollection_AsciiString _ior;
TCollection_AsciiString _parameters;
int _docID;
+
+
};
#endif
GEOM_SubShapeDriver.hxx \
GEOM_IOperations.hxx \
GEOM_ISubShape.hxx \
- GEOM_Solver.hxx \
+ GEOM_Solver.hxx \
GEOM_PythonDump.hxx \
GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx \
GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx \
# additional information to compile and link file
libGEOMbasic_la_CPPFLAGS = \
- $(CORBA_CXXFLAGS) \
- $(CORBA_INCLUDES) \
$(CAS_CPPFLAGS) \
$(KERNEL_CXXFLAGS) \
$(BOOST_CPPFLAGS) \
-I$(top_builddir)/idl
libGEOMbasic_la_LDFLAGS = \
- $(CORBA_LIBS) \
$(KERNEL_LDFLAGS) -lSALOMELocalTrace -lSALOMEBasics \
$(STDLIB) \
$(CAS_LDPATH) -lTKXSBase \
//=============================================================================
void GEOM_Object_i::SetColor(const SALOMEDS::Color& theColor)
{
- _impl->SetColor(theColor);
+ ::GEOM_Object::Color aColor;
+ aColor.R = theColor.R;
+ aColor.G = theColor.G;
+ aColor.B = theColor.B;
+ _impl->SetColor(aColor);
}
//=============================================================================
SALOMEDS::Color GEOM_Object_i::GetColor()
{
- return _impl->GetColor();
+ SALOMEDS::Color aColor;
+ aColor.R = _impl->GetColor().R;
+ aColor.G = _impl->GetColor().G;
+ aColor.B = _impl->GetColor().B;
+ return aColor;
}