incorporate the color and draw circle dots if we don't have an icon

This commit is contained in:
Konstantin Käfer
2014-05-19 16:19:51 +02:00
parent 9bb0146875
commit 7d73d158ba
8 changed files with 29 additions and 35 deletions

View File

@@ -65,7 +65,7 @@ struct IconClass {
std::array<FunctionProperty, 2> translate = {{ 0, 0 }};
TranslateAnchor translateAnchor = TranslateAnchor::Map;
FunctionProperty size;
Color color = {{ 0, 0, 0, 1 }};
Color color = {{ 1, 1, 1, 1 }};
FunctionProperty opacity = 1;
std::string image;
FunctionProperty radius = 0;
@@ -77,7 +77,7 @@ struct IconProperties {
std::array<float, 2> translate = {{ 0, 0 }};
TranslateAnchor translateAnchor = TranslateAnchor::Map;
float size = 0;
Color color = {{ 0, 0, 0, 1 }};
Color color = {{ 1, 1, 1, 1 }};
float opacity = 1.0;
std::string image;
float radius = 0;

View File

@@ -19,6 +19,10 @@ public:
explicit SpritePosition() {}
explicit SpritePosition(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint8_t pixelRatio = 1);
operator bool() const {
return !(width == 0 && height == 0 && x == 0 && y == 0);
}
uint16_t x = 0, y = 0;
uint16_t width = 0, height = 0;
uint8_t pixelRatio = 1;