[core] Eliminate use of ClassProperties for layout
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#include <mbgl/text/quads.hpp>
|
||||
#include <mbgl/text/shaping.hpp>
|
||||
#include <mbgl/geometry/anchor.hpp>
|
||||
#include <mbgl/style/style_properties.hpp>
|
||||
#include <mbgl/layer/symbol_layer.hpp>
|
||||
#include <mbgl/util/math.hpp>
|
||||
#include <cassert>
|
||||
|
||||
@@ -133,7 +133,7 @@ SymbolQuads getGlyphQuads(Anchor& anchor, const Shaping& shapedText,
|
||||
const bool alongLine, const GlyphPositions& face) {
|
||||
|
||||
const float textRotate = layout.text.rotate * M_PI / 180;
|
||||
const bool keepUpright = layout.text.keep_upright;
|
||||
const bool keepUpright = layout.text.keepUpright;
|
||||
|
||||
SymbolQuads quads;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include <mbgl/text/shaping.hpp>
|
||||
#include <mbgl/style/style_properties.hpp>
|
||||
#include <mbgl/layer/symbol_layer.hpp>
|
||||
|
||||
namespace mbgl {
|
||||
|
||||
PositionedIcon shapeIcon(const Rect<uint16_t>& image, const SymbolLayoutProperties& layout) {
|
||||
float dx = layout.icon.offset[0];
|
||||
float dy = layout.icon.offset[1];
|
||||
float dx = layout.icon.offset.value[0];
|
||||
float dy = layout.icon.offset.value[1];
|
||||
float x1 = dx - image.originalW / 2.0f;
|
||||
float x2 = x1 + image.originalW;
|
||||
float y1 = dy - image.originalH / 2.0f;
|
||||
|
||||
Reference in New Issue
Block a user