summaryrefslogtreecommitdiff
path: root/platform/android/src/text/local_glyph_rasterizer_jni.hpp
blob: 38d98d536800e960d1c504ea8eba1ee90d92a577 (plain)
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
#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