summaryrefslogtreecommitdiff
path: root/platform/android/src/text/local_glyph_rasterizer_jni.hpp
diff options
context:
space:
mode:
authorLangston Smith <langston.smith@mapbox.com>2018-01-04 11:15:50 -0800
committerGitHub <noreply@github.com>2018-01-04 11:15:50 -0800
commit2ea955d2751ba6459f99a0695e53505c0a11702b (patch)
treef54450918b634a2eea1bd2c4ebc671bf1bb06106 /platform/android/src/text/local_glyph_rasterizer_jni.hpp
parentf2ec6ae326bad79fea2b06a21151a2835522572a (diff)
parentc62b0af24fc76b4bb2eb34100611dd3ee9ee5536 (diff)
downloadqtlocation-mapboxgl-upstream/ls-android-readme-tweaks.tar.gz
Merge branch 'master' into ls-android-readme-tweaksupstream/ls-android-readme-tweaks
Diffstat (limited to 'platform/android/src/text/local_glyph_rasterizer_jni.hpp')
-rw-r--r--platform/android/src/text/local_glyph_rasterizer_jni.hpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/platform/android/src/text/local_glyph_rasterizer_jni.hpp b/platform/android/src/text/local_glyph_rasterizer_jni.hpp
new file mode 100644
index 0000000000..38d98d5368
--- /dev/null
+++ b/platform/android/src/text/local_glyph_rasterizer_jni.hpp
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <mbgl/util/image.hpp>
+
+#include <jni/jni.hpp>
+
+/*
+ android::LocalGlyphRasterizer is the JNI wrapper of
+ com/mapbox/mapboxsdk/text/LocalGlyphRasterizer
+
+ mbgl::LocalGlyphRasterizer is the portable interface
+ Both implementations are in local_glyph_rasterizer.cpp
+ */
+
+namespace mbgl {
+namespace android {
+
+class LocalGlyphRasterizer {
+public:
+ static PremultipliedImage drawGlyphBitmap(const std::string& fontFamily, const bool bold, const char16_t glyphID);
+
+ static constexpr auto Name() { return "com/mapbox/mapboxsdk/text/LocalGlyphRasterizer"; };
+
+ static jni::Class<LocalGlyphRasterizer> javaClass;
+
+ static void registerNative(jni::JNIEnv&);
+
+};
+
+} // namespace android
+} // namespace mbgl