Files
MapLibreParticleLab/platform/android/src/annotation/polygon.hpp
Pablo Guardiola b71d86599d [android] Polygon holes (#8557)
* add 1 hole support to polygon-related classes

* fix no hole crash and add triangle hole shape example

* add support for multiple holes
2017-04-11 19:10:46 +02:00

42 lines
996 B
C++

#pragma once
#include <mbgl/annotation/annotation.hpp>
#include <mbgl/util/color.hpp>
#include <string>
#include "multi_point.hpp"
#include "../geometry/lat_lng.hpp"
#include "../java/util.hpp"
namespace mbgl {
namespace android {
class Polygon : private MultiPoint {
public:
static constexpr auto Name() { return "com/mapbox/mapboxsdk/annotations/Polygon"; };
static jni::Class<Polygon> javaClass;
static mbgl::FillAnnotation toAnnotation(jni::JNIEnv&, jni::Object<Polygon>);
static void registerNative(jni::JNIEnv&);
private:
static jni::Object<java::util::List> getPoints(jni::JNIEnv&, jni::Object<Polygon>);
static jni::Object<java::util::List> getHoles(jni::JNIEnv&, jni::Object<Polygon>);
static float getOpacity(jni::JNIEnv&, jni::Object<Polygon>);
static mbgl::Color getFillColor(jni::JNIEnv&, jni::Object<Polygon>);
static mbgl::Color getOutlineColor(jni::JNIEnv&, jni::Object<Polygon>);
};
} // namespace android
} // namespace mbgl