[core] Eliminate use of ClassProperties for layout

This commit is contained in:
John Firebaugh
2015-10-26 10:14:24 -07:00
parent 728a9858ea
commit a562567589
33 changed files with 237 additions and 323 deletions

View File

@@ -27,8 +27,7 @@ void Painter::renderSDF(SymbolBucket &bucket,
{
mat4 vtxMatrix = translatedMatrix(matrix, styleProperties.translate, id, styleProperties.translate_anchor);
bool aligned_with_map = (bucketProperties.rotation_alignment == RotationAlignmentType::Map);
bool skewed = aligned_with_map;
bool skewed = (bucketProperties.rotationAlignment == RotationAlignmentType::Map);
mat4 exMatrix;
float s;
float gammaScale;
@@ -160,8 +159,8 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
}
// TODO remove the `true ||` when #1673 is implemented
const bool drawAcrossEdges = true || !(layout.text.allow_overlap || layout.icon.allow_overlap ||
layout.text.ignore_placement || layout.icon.ignore_placement);
const bool drawAcrossEdges = true || !(layout.text.allowOverlap || layout.icon.allowOverlap ||
layout.text.ignorePlacement || layout.icon.ignorePlacement);
// Disable the stencil test so that labels aren't clipped to tile boundaries.
//
@@ -176,7 +175,7 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
}
if (bucket.hasIconData()) {
if (layout.icon.rotation_alignment == RotationAlignmentType::Map) {
if (layout.icon.rotationAlignment == RotationAlignmentType::Map) {
config.depthFunc.reset();
config.depthTest = GL_TRUE;
} else {
@@ -186,7 +185,7 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
bool sdf = bucket.sdfIcons;
const float angleOffset =
layout.icon.rotation_alignment == RotationAlignmentType::Map
layout.icon.rotationAlignment == RotationAlignmentType::Map
? state.getAngle()
: 0;
@@ -209,7 +208,7 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
} else {
mat4 vtxMatrix = translatedMatrix(matrix, properties.icon.translate, id, properties.icon.translate_anchor);
bool skewed = layout.icon.rotation_alignment == RotationAlignmentType::Map;
bool skewed = layout.icon.rotationAlignment == RotationAlignmentType::Map;
mat4 exMatrix;
float s;
@@ -253,7 +252,7 @@ void Painter::renderSymbol(SymbolBucket& bucket, const SymbolLayer& layer, const
}
if (bucket.hasTextData()) {
if (layout.text.rotation_alignment == RotationAlignmentType::Map) {
if (layout.text.rotationAlignment == RotationAlignmentType::Map) {
config.depthFunc.reset();
config.depthTest = GL_TRUE;
} else {