remove *-enabled

refs mapbox/mapbox-gl-style-spec#94
This commit is contained in:
Konstantin Käfer
2014-07-10 15:51:35 -07:00
parent f519625ed2
commit 9846cb75f4
10 changed files with 6 additions and 47 deletions

View File

@@ -4,7 +4,6 @@
namespace llmr {
enum class PropertyKey {
FillEnabled,
FillAntialias,
FillOpacity,
FillColor,
@@ -15,7 +14,6 @@ enum class PropertyKey {
FillTranslateAnchor,
FillImage,
LineEnabled,
LineOpacity,
LineColor,
LineTranslate, // for transitions only
@@ -30,12 +28,10 @@ enum class PropertyKey {
LineDashGap,
LineImage,
IconEnabled,
IconOpacity,
IconRotate,
IconRotateAnchor,
TextEnabled,
TextOpacity,
TextSize,
TextColor,
@@ -43,10 +39,8 @@ enum class PropertyKey {
TextHaloWidth,
TextHaloBlur,
CompositeEnabled,
CompositeOpacity,
RasterEnabled,
RasterOpacity,
RasterSpin,
RasterBrightnessLow,

View File

@@ -14,7 +14,6 @@ namespace llmr {
struct FillProperties {
FillProperties() {}
bool enabled = true;
bool antialias = true;
float opacity = 1.0f;
Color fill_color = {{ 0, 0, 0, 1 }};
@@ -24,13 +23,12 @@ struct FillProperties {
std::string image;
inline bool isVisible() const {
return enabled && opacity > 0 && (fill_color[3] > 0 || stroke_color[3] > 0);
return opacity > 0 && (fill_color[3] > 0 || stroke_color[3] > 0);
}
};
struct LineProperties {
inline LineProperties() {}
bool enabled = true;
float opacity = 1.0f;
Color color = {{ 0, 0, 0, 1 }};
std::array<float, 2> translate = {{ 0, 0 }};
@@ -42,25 +40,23 @@ struct LineProperties {
std::string image;
inline bool isVisible() const {
return enabled && opacity > 0 && color[3] > 0 && width > 0;
return opacity > 0 && color[3] > 0 && width > 0;
}
};
struct IconProperties {
inline IconProperties() {}
bool enabled = true;
float opacity = 1.0f;
float rotate = 0.0f;
RotateAnchorType rotate_anchor = RotateAnchorType::Default;
inline bool isVisible() const {
return enabled && opacity > 0;
return opacity > 0;
}
};
struct TextProperties {
inline TextProperties() {}
bool enabled = true;
float opacity = 1.0f;
float size = 12.0f;
Color color = {{ 0, 0, 0, 1 }};
@@ -69,23 +65,21 @@ struct TextProperties {
float halo_blur = 1.0f;
inline bool isVisible() const {
return enabled && opacity > 0 && (color[3] > 0 || halo_color[3] > 0) && size > 0;
return opacity > 0 && (color[3] > 0 || halo_color[3] > 0) && size > 0;
}
};
struct CompositeProperties {
inline CompositeProperties() {}
bool enabled = true;
float opacity = 1.0f;
inline bool isVisible() const {
return enabled && opacity > 0;
return opacity > 0;
}
};
struct RasterProperties {
inline RasterProperties() {}
bool enabled = true;
float opacity = 1.0f;
float spin = 0.0f;
std::array<float, 2> brightness = {{ 0, 1 }};
@@ -94,7 +88,7 @@ struct RasterProperties {
float fade = 0.0f;
inline bool isVisible() const {
return enabled && opacity > 0;
return opacity > 0;
}
};