change hidden to enabled

refs #83
This commit is contained in:
Konstantin Käfer
2014-03-25 13:23:51 +01:00
parent 48e8ca0e43
commit 166305fb14
4 changed files with 23 additions and 23 deletions

View File

@@ -366,7 +366,7 @@ void Painter::renderLine(LineBucket& bucket, const std::string& layer_name, cons
if (bucket.empty()) return;
const LineProperties& properties = style.computed.lines[layer_name];
if (properties.hidden) return;
if (!properties.enabled) return;
float width = properties.width;
float offset = properties.offset / 2;
@@ -447,7 +447,7 @@ void Painter::renderPoint(PointBucket& bucket, const std::string& layer_name, co
if (pass == Opaque) return;
const PointProperties& properties = style.computed.points[layer_name];
if (properties.hidden) return;
if (!properties.enabled) return;
Color color = properties.color;
color[0] *= properties.opacity;
@@ -489,7 +489,7 @@ void Painter::renderText(TextBucket& bucket, const std::string& layer_name, cons
if (bucket.empty()) return;
const TextProperties& properties = style.computed.texts[layer_name];
if (properties.hidden) return;
if (!properties.enabled) return;
mat4 exMatrix;
matrix::copy(exMatrix, projMatrix);

View File

@@ -37,7 +37,7 @@ void Style::cascade(float z) {
// TODO: This should be restricted to fill styles that have actual
// values so as to not override with default values.
llmr::FillProperties& fill = computed.fills[layer_name];
fill.hidden = layer.hidden(z);
fill.enabled = layer.enabled(z);
fill.winding = layer.winding;
fill.antialias = layer.antialias(z);
fill.fill_color = layer.fill_color;
@@ -54,7 +54,7 @@ void Style::cascade(float z) {
// TODO: This should be restricted to line styles that have actual
// values so as to not override with default values.
llmr::LineProperties& stroke = computed.lines[layer_name];
stroke.hidden = layer.hidden(z);
stroke.enabled = layer.enabled(z);
stroke.width = layer.width(z);
stroke.offset = layer.offset(z);
stroke.color = layer.color;
@@ -69,7 +69,7 @@ void Style::cascade(float z) {
// TODO: This should be restricted to point styles that have actual
// values so as to not override with default values.
llmr::PointProperties& point = computed.points[layer_name];
point.hidden = layer.hidden(z);
point.enabled = layer.enabled(z);
point.color = layer.color;
point.size = layer.size(z);
point.opacity = layer.opacity(z);
@@ -83,7 +83,7 @@ void Style::cascade(float z) {
// TODO: This should be restricted to point styles that have actual
// values so as to not override with default values.
llmr::TextProperties& text = computed.texts[layer_name];
text.hidden = layer.hidden(z);
text.enabled = layer.enabled(z);
text.color = layer.color;
text.size = layer.size(z);
text.halo = layer.halo;

View File

@@ -428,8 +428,8 @@ FunctionProperty<bool> StyleParser::parseBoolFunction(JSVal value) {
FillClass StyleParser::parseFillClass(JSVal value) {
FillClass klass;
if (value.HasMember("hidden")) {
klass.hidden = parseBoolFunction(value["hidden"]);
if (value.HasMember("enabled")) {
klass.enabled = parseBoolFunction(value["enabled"]);
}
if (value.HasMember("color")) {
@@ -460,8 +460,8 @@ FillClass StyleParser::parseFillClass(JSVal value) {
LineClass StyleParser::parseLineClass(JSVal value) {
LineClass klass;
if (value.HasMember("hidden")) {
klass.hidden = parseBoolFunction(value["hidden"]);
if (value.HasMember("enabled")) {
klass.enabled = parseBoolFunction(value["enabled"]);
}
if (value.HasMember("color")) {
@@ -482,8 +482,8 @@ LineClass StyleParser::parseLineClass(JSVal value) {
PointClass StyleParser::parsePointClass(JSVal value) {
PointClass klass;
if (value.HasMember("hidden")) {
klass.hidden = parseBoolFunction(value["hidden"]);
if (value.HasMember("enabled")) {
klass.enabled = parseBoolFunction(value["enabled"]);
}
if (value.HasMember("color")) {
@@ -509,8 +509,8 @@ PointClass StyleParser::parsePointClass(JSVal value) {
TextClass StyleParser::parseTextClass(JSVal value) {
TextClass klass;
if (value.HasMember("hidden")) {
klass.hidden = parseBoolFunction(value["hidden"]);
if (value.HasMember("enabled")) {
klass.enabled = parseBoolFunction(value["enabled"]);
}
if (value.HasMember("color")) {