Salome HOME
Merge remote-tracking branch 'origin/BR_1321_ECW' into BR_DEMO
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ShapeImage.h
index ac8a4d1674459b3a216c4729508a54750ab935fb..17c6dec0437a70a99bf2d0af6058d0f5c15a334b 100644 (file)
@@ -1,12 +1,8 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  EDF-R&D
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #include <HYDROGUI_Shape.h>
 
-class Handle_HYDROData_Image;
-class QImage;
+#include <QPolygonF>
+
+class HYDROData_Image;
 
 class HYDROGUI_ShapeImage : public HYDROGUI_Shape
 {
 public:
   HYDROGUI_ShapeImage( const Handle(AIS_InteractiveContext)& theContext,
-                       const Handle_HYDROData_Image&         theImage,
+                       const Handle(HYDROData_Image)&        theImage,
                        const int                             theZLayer = -1 );
   virtual ~HYDROGUI_ShapeImage();
 
-  virtual void               setTextureFileName( const QString& theFileName,
-                                                 const bool     theToDisplay = true,
-                                                 const bool     theIsUpdateViewer = true );
-  virtual QString            getTextureFileName() const;
-
-  virtual void               update( bool isUpdateViewer,
-                                     bool isDeactivateSelection );
+  virtual void                         update( bool isUpdateViewer, bool isDeactivateSelection );
 
 protected:
-  virtual Handle_AIS_InteractiveObject createShape() const;
-
-private:
-  static QString             generateTextureFileName( const Handle(HYDROData_Entity)& theImageObj );
-  void                       removeTextureFile() const;
-
-  static QImage              reduceTexture( const QImage& theImage, const int theSizeLimit );
-
-private:
-  QString myTextureFileName;
+  virtual QList<Handle(AIS_InteractiveObject)> createShape() const;
+  Handle(Image_PixMap)                  imagePixMap( const Handle(HYDROData_Image)& ) const;
+  QPolygonF                             imageContour( const Handle(HYDROData_Image)& ) const;
 };
 
 #endif