本文整理汇总了C++中AnnotationTest类的典型用法代码示例。如果您正苦于以下问题:C++ AnnotationTest类的具体用法?C++ AnnotationTest怎么用?C++ AnnotationTest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AnnotationTest类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TEST
TEST(Annotations, StyleSourcedShapeAnnotation) {
AnnotationTest test;
Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
test.map.setStyleJSON(util::read_file("test/fixtures/api/annotation.json"));
test.map.addAnnotation(StyleSourcedAnnotation { polygon, "annotation" });
test.checkRendering("style_sourced_shape_annotation");
}
示例2: TEST
TEST(Annotations, ReaddImage) {
AnnotationTest test;
test.map.getStyle().loadJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotationImage(namedMarker("default_marker"));
test.map.addAnnotation(SymbolAnnotation { Point<double> { 0, 0 }, "default_marker" });
test.frontend.render(test.map);
test.map.addAnnotationImage(std::make_unique<style::Image>("default_marker", namedImage("flipped_marker"), 1.0));
test.checkRendering("readd_image");
}
示例3: TEST
TEST(Annotations, DebugEmpty) {
// This test should render nothing, not even the tile borders. Tile borders are only rendered
// when there is an actual tile we're trying to render, but since there is no annotation, we
// should not render them.
AnnotationTest test;
test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.setDebug(MapDebugOptions::TileBorders);
test.map.setZoom(1);
test.checkRendering("debug_empty");
}
示例4: TEST
TEST(Annotations, UpdateFillAnnotationStyle) {
AnnotationTest test;
Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
FillAnnotation annotation { polygon };
annotation.color = { { 255, 0, 0, 1 } };
test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
AnnotationID fill = test.map.addAnnotation(annotation);
test::render(test.map, test.view);
annotation.color = { { 0, 255, 0, 1 } };
test.map.updateAnnotation(fill, annotation);
test.checkRendering("update_fill_style");
}