pass style into painter

This commit is contained in:
Konstantin Käfer
2014-01-23 16:36:04 +01:00
parent 9ba8d5b7a6
commit 2a6e4597e2
5 changed files with 12 additions and 11 deletions

View File

@@ -60,8 +60,8 @@ private:
private:
Settings& settings;
Transform transform;
Painter painter;
Style style;
Painter painter;
int32_t min_zoom;
int32_t max_zoom;

View File

@@ -11,13 +11,14 @@ namespace llmr {
class Settings;
class Transform;
class Style;
class FillBucket;
struct FillProperties;
class Painter {
public:
Painter(Transform& transform, Settings& settings);
Painter(Transform& transform, Settings& settings, Style& style);
// Make noncopyable
Painter(const Painter&) = delete;
@@ -49,6 +50,7 @@ public:
private:
Transform& transform;
Settings& settings;
Style& style;
float matrix[16];
Shader *currentShader;

View File

@@ -2,6 +2,7 @@
#define LLMR_STYLE_STYLE
#include <array>
#include <map>
#include "../util/pbf.hpp"
namespace llmr {
@@ -43,8 +44,9 @@ public:
void reset();
void load(pbf data);
// StrokeStyle strokeStyle(const std::string& layer_name) const;
// FillProperties fillStyle(const std::string& layer_name) const;
public:
std::map<std::string, FillProperties> computedFills;
std::map<std::string, StrokeProperties> computedStrokes;
};
}