parse the json stylesheet
This commit is contained in:
@@ -10,6 +10,7 @@ namespace llmr {
|
||||
|
||||
class ClassDescription {
|
||||
public:
|
||||
BackgroundClass background;
|
||||
std::map<std::string, FillClass> fill;
|
||||
std::map<std::string, LineClass> line;
|
||||
std::map<std::string, PointClass> point;
|
||||
|
||||
@@ -112,6 +112,10 @@ struct FillProperties {
|
||||
std::string image;
|
||||
};
|
||||
|
||||
struct BackgroundClass {
|
||||
Color fill_color = {{ 0, 0, 0, 0 }};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,15 +18,15 @@ namespace llmr {
|
||||
class Sprite;
|
||||
|
||||
class Style {
|
||||
public:
|
||||
struct exception : std::runtime_error { exception(const char *msg) : std::runtime_error(msg) {} };
|
||||
|
||||
public:
|
||||
Style();
|
||||
|
||||
void reset();
|
||||
void load(const uint8_t *const data, size_t bytes);
|
||||
|
||||
// This is commented out because it is not fully implemented yet. For now,
|
||||
// we keep using the protobuf stylesheet format
|
||||
// void loadJSON(const std::string& data);
|
||||
void loadJSON(const uint8_t *const data, size_t bytes);
|
||||
|
||||
void cascade(float z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user