This repository was archived by the owner on Mar 24, 2020. It is now read-only.
forked from springmeyer/mapnik-jni
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmapnikjni.cpp
96 lines (90 loc) · 2.13 KB
/
mapnikjni.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include <jni.h>
#include <mapnik/version.hpp>
#include <mapnik/map.hpp>
#include <mapnik/load_map.hpp>
#include <mapnik/layer.hpp>
#include <mapnik/feature_type_style.hpp>
#include <mapnik/datasource.hpp>
#include <mapnik/datasource_cache.hpp>
#include <mapnik/attribute_collector.hpp>
#include <mapnik/save_map.hpp>
#include <mapnik/feature.hpp>
#include <mapnik/image_util.hpp>
#include <mapnik/agg_renderer.hpp>
#include <mapnik/font_engine_freetype.hpp>
#include <mapnik/geometry_type.hpp>
#include <mapnik/projection.hpp>
#include <mapnik/vertex_processor.hpp>
#include <boost/variant/static_visitor.hpp>
#include "mapnikjni.h"
#include "globals.cpp"
#include "class_parameters.cpp"
#include "class_map.cpp"
#include "class_layer.cpp"
#include "class_datasource.cpp"
#include "class_datasourcecache.cpp"
#include "class_featuretypestyle.cpp"
#include "class_projection.cpp"
#include "class_query.cpp"
#include "class_featureset.cpp"
#include "class_geometry.cpp"
#include "class_image.cpp"
#include "class_renderer.cpp"
#include "class_freetypeengine.cpp"
/// -- Mapnik class
/*
* Class: mapnik_Mapnik
* Method: nativeInit
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_mapnik_Mapnik_nativeInit
(JNIEnv *env, jclass c)
{
PREAMBLE;
if (initialized) return;
if (init_ids(env))
initialized=true;
TRAILER_VOID;
}
/*
* Class: mapnik_Mapnik
* Method: getInstalledFontsDir
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_mapnik_Mapnik_getInstalledFontsDir
(JNIEnv *env, jclass)
{
#ifndef MAPNIK_FONTS_DIR
return 0;
#else
return env->NewStringUTF(MAPNIK_FONTS_DIR);
#endif
}
/*
* Class: mapnik_Mapnik
* Method: getInstalledInputPluginsDir
* Signature: ()Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_mapnik_Mapnik_getInstalledInputPluginsDir
(JNIEnv *env, jclass)
{
#ifndef MAPNIK_INPUT_PLUGINS_DIR
return 0;
#else
return env->NewStringUTF(MAPNIK_INPUT_PLUGINS_DIR);
#endif
}
/*
* Class: mapnik_Mapnik
* Method: isThreadSafe
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_mapnik_Mapnik_isThreadSafe
(JNIEnv *env, jclass c)
{
#ifdef MAPNIK_THREADSAFE
return 1;
#else
return 0;
#endif
}