-class Handle_AIS_InteractiveContext;
-class Handle_AIS_InteractiveObject;
-class Handle_Aspect_ColorScale;
+class AIS_InteractiveObject;
+class AIS_ColorScale;
+
+#define OCC_VERSION_LARGE (OCC_VERSION_MAJOR << 24 | OCC_VERSION_MINOR << 16 | OCC_VERSION_MAINTENANCE << 8)
+#if OCC_VERSION_LARGE >= 0x07020000
+const bool SWAP_RGB = false;
+#else
+const bool SWAP_RGB = true;
+#endif
- static void eraseAll( bool isUpdate );
- static void show( const Handle_AIS_InteractiveObject& theObject,
+ static void eraseAll( bool isUpdate, bool eraseStructures = false );
+ static void show( const Handle(AIS_InteractiveObject)& theObject,
int theMode, int theSelectionMode, bool isFitAll, const char* theKey );
static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor,
int theUIANb = 10, int theVIANb = 10);
static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey,
int theUIANb = 10, int theVIANb = 10);
int theMode, int theSelectionMode, bool isFitAll, const char* theKey );
static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor,
int theUIANb = 10, int theVIANb = 10);
static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey,
int theUIANb = 10, int theVIANb = 10);
- static bool AssertImages( QString& theMessage, const QImage* = 0, const char* theCase = 0 );
+ static bool AssertImages( QString& theMessage, const QImage* = 0, const char* theCase = 0, bool swapRGB = SWAP_RGB );
+#define CPPUNIT_ASSERT_IMAGES3( theImage, theCase, theSwapRGB ) \
+ { \
+ QString aMessage; \
+ if( !TestViewer::AssertImages( aMessage, theImage, theCase, theSwapRGB ) ) \
+ { \
+ TestViewer::showColorScale( false ); \
+ std::string aMessageStl = aMessage.toStdString(); \
+ CPPUNIT_FAIL( aMessageStl.c_str() ); \
+ } \
+ }
+