]> OCCT Git - occt-copy.git/commitdiff
0030182: Visualization, Image_AlienPixMap - support reading encoded image from memory...
authorkgv <kgv@opencascade.com>
Thu, 28 Feb 2019 22:26:20 +0000 (01:26 +0300)
committernds <nds@opencascade.com>
Thu, 13 Jun 2019 10:37:41 +0000 (13:37 +0300)
correction compilation for checked UseFreeImage state in CMake. The patch is not necessary after porting branch to master.

src/Image/Image_AlienPixMap.cxx
src/QABugs/QABugs_1.cxx

index ba166a5fc6482c48f7f19127913aae6ca66e8fba..224cb8035fa1c0eeb36bdcc84190615df2aa0e4a 100644 (file)
@@ -13,6 +13,8 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <windows.h>
+
 #if !defined(HAVE_FREEIMAGE) && defined(_WIN32)
   #define HAVE_WINCODEC
 #endif
@@ -455,12 +457,12 @@ bool Image_AlienPixMap::InitCopy (const Image_PixMap& theCopy)
      && TopDownInc()   == theCopy.TopDownInc())
     {
       // copy with one call
-      memcpy (ChangeData(), theCopy.Data(), std::min (SizeBytes(), theCopy.SizeBytes()));
+      memcpy (ChangeData(), theCopy.Data(), min (SizeBytes(), theCopy.SizeBytes()));
       return true;
     }
 
     // copy row-by-row
-    const Standard_Size aRowSizeBytes = std::min (SizeRowBytes(), theCopy.SizeRowBytes());
+    const Standard_Size aRowSizeBytes = min (SizeRowBytes(), theCopy.SizeRowBytes());
     for (Standard_Size aRow = 0; aRow < myData.SizeY; ++aRow)
     {
       memcpy (ChangeRow (aRow), theCopy.Row (aRow), aRowSizeBytes);
index 5c49711020ff37a2152e1f2676e5146ebfb0e928..9fbad4675d21ab575adeb546600ab66a54e8110f 100644 (file)
@@ -502,7 +502,7 @@ static Standard_Integer OCC30182 (Draw_Interpretor& , Standard_Integer theNbArgs
   TopoDS_Shape aShape = BRepPrimAPI_MakeBox (100.0 * anImage->Ratio(), 100.0, 1.0).Shape();
   Handle(AIS_Shape) aPrs = new AIS_Shape (aShape);
   aPrs->SetDisplayMode (AIS_Shaded);
-  aPrs->Attributes()->SetupOwnShadingAspect();
+  //aPrs->Attributes()->SetupOwnShadingAspect(); // corrected after porting on current master
   const Handle(Graphic3d_AspectFillArea3d)& anAspect = aPrs->Attributes()->ShadingAspect()->Aspect();
   anAspect->SetShadingModel (Graphic3d_TOSM_UNLIT);
   anAspect->SetTextureMapOn (true);