blob: a485621ac6efd66a8174e08bdd8650332e24893d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<%
const type = locals.type;
const layoutProperties = locals.layoutProperties;
const paintProperties = locals.paintProperties;
-%>
// This file is generated. Edit scripts/generate-style-code.js, then run `make style-code`.
#pragma once
#include <mbgl/style/types.hpp>
#include <mbgl/style/layout_property.hpp>
#include <mbgl/style/paint_property.hpp>
namespace mbgl {
namespace style {
class CascadeParameters;
class CalculationParameters;
<% if (layoutProperties.length) { -%>
class <%- camelize(type) %>LayoutProperties {
public:
void recalculate(const CalculationParameters&);
<% for (const property of layoutProperties) { -%>
LayoutProperty<<%- propertyType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %> { <%- defaultValue(property) %> };
<% } -%>
};
<% } -%>
class <%- camelize(type) %>PaintProperties {
public:
void cascade(const CascadeParameters&);
bool recalculate(const CalculationParameters&);
<% for (const property of paintProperties) { -%>
<% if (/-pattern$/.test(property.name) || property.name === 'line-dasharray') { -%>
PaintProperty<<%- propertyType(property) %>, CrossFadedPropertyEvaluator> <%- camelizeWithLeadingLowercase(property.name) %> { <%- defaultValue(property) %> };
<% } else if (property.name === 'fill-outline-color') { -%>
PaintProperty<<%- propertyType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %> { { 0, 0, 0, -1 } };
<% } else { -%>
PaintProperty<<%- propertyType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %> { <%- defaultValue(property) %> };
<% } -%>
<% } -%>
};
} // namespace style
} // namespace mbgl
|