From: kgv Date: Thu, 28 Feb 2019 22:26:20 +0000 (+0300) Subject: 0030182: Visualization, Image_AlienPixMap - support reading encoded image from memory... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=f30e3e19347c1a1849f14aaa48b81ecb08f85cd8;p=occt-copy.git 0030182: Visualization, Image_AlienPixMap - support reading encoded image from memory buffer correction compilation for checked UseFreeImage state in CMake. The patch is not necessary after porting branch to master. --- diff --git a/src/Image/Image_AlienPixMap.cxx b/src/Image/Image_AlienPixMap.cxx index ba166a5fc6..224cb8035f 100644 --- a/src/Image/Image_AlienPixMap.cxx +++ b/src/Image/Image_AlienPixMap.cxx @@ -13,6 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. +#include + #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); diff --git a/src/QABugs/QABugs_1.cxx b/src/QABugs/QABugs_1.cxx index 5c49711020..9fbad4675d 100644 --- a/src/QABugs/QABugs_1.cxx +++ b/src/QABugs/QABugs_1.cxx @@ -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);