[core] change std::array<uint16_t, 2> to mbgl::Size
This commit is contained in:
@@ -27,7 +27,7 @@ public:
|
||||
OffscreenView view{ backend.getContext() };
|
||||
StubFileSource fileSource;
|
||||
ThreadPool threadPool { 4 };
|
||||
Map map { backend, view.getSize(), 1, fileSource, threadPool, MapMode::Still };
|
||||
Map map { backend, view.size, 1, fileSource, threadPool, MapMode::Still };
|
||||
|
||||
void checkRendering(const char * name) {
|
||||
test::checkImage(std::string("test/fixtures/annotations/") + name,
|
||||
@@ -45,8 +45,8 @@ TEST(Annotations, SymbolAnnotation) {
|
||||
test.map.addAnnotation(SymbolAnnotation { Point<double>(0, 0), "default_marker" });
|
||||
test.checkRendering("point_annotation");
|
||||
|
||||
auto size = test.view.getSize();
|
||||
auto screenBox = ScreenBox { {}, { double(size[0]), double(size[1]) } };
|
||||
auto size = test.view.size;
|
||||
auto screenBox = ScreenBox { {}, { double(size.width), double(size.height) } };
|
||||
auto features = test.map.queryPointAnnotations(screenBox);
|
||||
EXPECT_EQ(features.size(), 1u);
|
||||
|
||||
@@ -354,8 +354,8 @@ TEST(Annotations, QueryRenderedFeatures) {
|
||||
TEST(Annotations, QueryFractionalZoomLevels) {
|
||||
AnnotationTest test;
|
||||
|
||||
auto viewSize = test.view.getSize();
|
||||
auto box = ScreenBox { {}, { double(viewSize[0]), double(viewSize[1]) } };
|
||||
auto viewSize = test.view.size;
|
||||
auto box = ScreenBox { {}, { double(viewSize.width), double(viewSize.height) } };
|
||||
|
||||
test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
|
||||
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
|
||||
@@ -386,8 +386,8 @@ TEST(Annotations, QueryFractionalZoomLevels) {
|
||||
TEST(Annotations, VisibleFeatures) {
|
||||
AnnotationTest test;
|
||||
|
||||
auto viewSize = test.view.getSize();
|
||||
auto box = ScreenBox { {}, { double(viewSize[0]), double(viewSize[1]) } };
|
||||
auto viewSize = test.view.size;
|
||||
auto box = ScreenBox { {}, { double(viewSize.width), double(viewSize.height) } };
|
||||
|
||||
test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
|
||||
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
|
||||
|
||||
Reference in New Issue
Block a user