improved win32 support from Valery Moiseev.
This commit is contained in:
parent
5549045aaa
commit
ed5bbe25fe
9 changed files with 27 additions and 27 deletions
|
@ -26,13 +26,21 @@
|
||||||
// Windows DLL support
|
// Windows DLL support
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
# define MAPNIK_EXP __declspec (dllexport)
|
||||||
|
# define MAPNIK_IMP __declspec (dllimport)
|
||||||
|
# ifdef MAPNIK_EXPORTS
|
||||||
# define MAPNIK_DECL __declspec (dllexport)
|
# define MAPNIK_DECL __declspec (dllexport)
|
||||||
|
# else
|
||||||
|
# define MAPNIK_DECL __declspec (dllimport)
|
||||||
|
# endif
|
||||||
# pragma warning( disable: 4251 )
|
# pragma warning( disable: 4251 )
|
||||||
# pragma warning( disable: 4275 )
|
# pragma warning( disable: 4275 )
|
||||||
# if (_MSC_VER >= 1400) // vc8
|
# if (_MSC_VER >= 1400) // vc8
|
||||||
# pragma warning(disable : 4996) //_CRT_SECURE_NO_DEPRECATE
|
# pragma warning(disable : 4996) //_CRT_SECURE_NO_DEPRECATE
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
|
# define MAPNIK_EXP
|
||||||
|
# define MAPNIK_IMP
|
||||||
# define MAPNIK_DECL
|
# define MAPNIK_DECL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -108,15 +108,15 @@ namespace mapnik {
|
||||||
|
|
||||||
|
|
||||||
#define DATASOURCE_PLUGIN(classname) \
|
#define DATASOURCE_PLUGIN(classname) \
|
||||||
extern "C" MAPNIK_DECL std::string datasource_name() \
|
extern "C" MAPNIK_EXP std::string datasource_name() \
|
||||||
{ \
|
{ \
|
||||||
return classname::name(); \
|
return classname::name(); \
|
||||||
} \
|
} \
|
||||||
extern "C" MAPNIK_DECL datasource* create(const parameters ¶ms) \
|
extern "C" MAPNIK_EXP datasource* create(const parameters ¶ms) \
|
||||||
{ \
|
{ \
|
||||||
return new classname(params); \
|
return new classname(params); \
|
||||||
} \
|
} \
|
||||||
extern "C" MAPNIK_DECL void destroy(datasource *ds) \
|
extern "C" MAPNIK_EXP void destroy(datasource *ds) \
|
||||||
{ \
|
{ \
|
||||||
delete ds; \
|
delete ds; \
|
||||||
} \
|
} \
|
||||||
|
|
|
@ -148,7 +148,7 @@ namespace mapnik
|
||||||
{
|
{
|
||||||
double len2 = distance2(ax,ay,bx,by);
|
double len2 = distance2(ax,ay,bx,by);
|
||||||
|
|
||||||
if (len2 < 1e-7)
|
if (len2 < 1e-14)
|
||||||
{
|
{
|
||||||
return distance(x,y,ax,ay);
|
return distance(x,y,ax,ay);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,19 +33,11 @@
|
||||||
|
|
||||||
namespace mapnik {
|
namespace mapnik {
|
||||||
|
|
||||||
template <typename T>
|
template <typename T> MAPNIK_DECL
|
||||||
void save_to_file(std::string const& filename,
|
void save_to_file(std::string const& filename,
|
||||||
std::string const& type,
|
std::string const& type,
|
||||||
T const& image);
|
T const& image);
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void save_as_png(std::string const& filename,
|
|
||||||
Image32 const& image);
|
|
||||||
template <typename T>
|
|
||||||
void save_as_jpeg(std::string const& filename,
|
|
||||||
int quality,
|
|
||||||
T const& image);
|
|
||||||
|
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
double distance(T x0,T y0,T x1,T y1)
|
double distance(T x0,T y0,T x1,T y1)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
namespace mapnik
|
namespace mapnik
|
||||||
{
|
{
|
||||||
void load_map(Map & map, std::string const& filename);
|
MAPNIK_DECL void load_map(Map & map, std::string const& filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // LOAD_MAP_HPP
|
#endif // LOAD_MAP_HPP
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
namespace mapnik
|
namespace mapnik
|
||||||
{
|
{
|
||||||
void save_map(Map const& map, std::string const& filename);
|
MAPNIK_DECL void save_map(Map const& map, std::string const& filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // SAVE_MAP_HPP
|
#endif // SAVE_MAP_HPP
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
using namespace mapnik;
|
using namespace mapnik;
|
||||||
|
|
||||||
class MAPNIK_DECL shape_datasource : public datasource
|
class shape_datasource : public datasource
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
shape_datasource(const parameters ¶ms);
|
shape_datasource(const parameters ¶ms);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
using namespace mapnik;
|
using namespace mapnik;
|
||||||
|
|
||||||
template <typename filterT>
|
template <typename filterT>
|
||||||
class MAPNIK_DECL shape_featureset : public Featureset
|
class shape_featureset : public Featureset
|
||||||
{
|
{
|
||||||
filterT filter_;
|
filterT filter_;
|
||||||
int shape_type_;
|
int shape_type_;
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "shape_featureset.hpp"
|
#include "shape_featureset.hpp"
|
||||||
|
|
||||||
template <typename filterT>
|
template <typename filterT>
|
||||||
class MAPNIK_DECL shape_index_featureset : public Featureset
|
class shape_index_featureset : public Featureset
|
||||||
{
|
{
|
||||||
filterT filter_;
|
filterT filter_;
|
||||||
int shape_type_;
|
int shape_type_;
|
||||||
|
|
Loading…
Reference in a new issue