-// Copyright (C) 2005-2013 OPEN CASCADE
+// Copyright (C) 2005-2024 OPEN CASCADE
//
// 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
// Author : Vadim SANDLER (OCN)
// Created : 13/07/05
///////////////////////////////////////////////////////////
-//
#include "SIERPINSKY_Gen_i.hxx"
#include "SIERPINSKY_version.h"
#include <MED_Factory.hxx>
-#ifndef WIN32
+#ifdef WITH_LIBGD
#include <gd.h>
-#endif
+#endif // WITH_LIBGD
/*!
* Engine factory
*/
extern "C"
-{
+{
+ SIERPINSKYENGINE_EXPORT
PortableServer::ObjectId * SIERPINSKYEngine_factory( CORBA::ORB_ptr orb,
PortableServer::POA_ptr poa,
PortableServer::ObjectId* contId,
*/
CORBA::Boolean SIERPINSKY_Gen_i::ExportToJPEG( const char* theFileName, CORBA::Long theSize )
{
-#ifndef WIN32
+#ifdef WITH_LIBGD
if ( theSize <= 0 ) return false;
// open file
gdImageDestroy( image );
return true;
-#else
- printf("Warning: ExportToJPEG() is not supported on Windows!");
+#else // WITH_LIBGD
+ printf("Warning: ExportToJPEG() is not supported (libgd is required)!");
return false;
-#endif
+#endif // WITH_LIBGD
}
/*!
}
// create MED 2.2 file
- MED::PWrapper aMed = MED::CrWrapper( theFileName, MED::eV2_2 );
+ MED::PWrapper aMed = MED::CrWrapperW( theFileName );
// create 2D mesh
MED::PMeshInfo aMesh = aMed->CrMeshInfo( 2, 2, "Sierpinsky" );