void StyleLayer::applyStyleProperties<FillProperties>(const float z, const TimePoint now, const ZoomHistory &zoomHistory) {
    properties.set<FillProperties>();
    FillProperties &fill = properties.get<FillProperties>();
    applyStyleProperty(PropertyKey::FillAntialias, fill.antialias, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::FillOpacity, fill.opacity, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::FillColor, fill.fill_color, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::FillOutlineColor, fill.stroke_color, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::FillTranslate, fill.translate, z, now, zoomHistory);
    applyStyleProperty(PropertyKey::FillTranslateAnchor, fill.translateAnchor, z, now, zoomHistory);
    applyStyleProperty(PropertyKey::FillImage, fill.image, z, now, zoomHistory);
}
Example #2
0
void StyleLayer::applyStyleProperties<FillProperties>(const float z, const timestamp now) {
    properties.set<FillProperties>();
    FillProperties &fill = properties.get<FillProperties>();
    applyStyleProperty(PropertyKey::FillAntialias, fill.antialias, z, now);
    applyTransitionedStyleProperty(PropertyKey::FillOpacity, fill.opacity, z, now);
    applyTransitionedStyleProperty(PropertyKey::FillColor, fill.fill_color, z, now);
    applyTransitionedStyleProperty(PropertyKey::FillOutlineColor, fill.stroke_color, z, now);
    applyTransitionedStyleProperty(PropertyKey::FillTranslateX, fill.translate[0], z, now);
    applyTransitionedStyleProperty(PropertyKey::FillTranslateY, fill.translate[1], z, now);
    applyStyleProperty(PropertyKey::FillTranslateAnchor, fill.translateAnchor, z, now);
    applyStyleProperty(PropertyKey::FillImage, fill.image, z, now);
}
Example #3
0
void StyleLayer::applyStyleProperties<LineProperties>(const float z, const timestamp now) {
    properties.set<LineProperties>();
    LineProperties &line = properties.get<LineProperties>();
    applyTransitionedStyleProperty(PropertyKey::LineOpacity, line.opacity, z, now);
    applyTransitionedStyleProperty(PropertyKey::LineColor, line.color, z, now);
    applyTransitionedStyleProperty(PropertyKey::LineTranslateX, line.translate[0], z, now);
    applyTransitionedStyleProperty(PropertyKey::LineTranslateY, line.translate[1], z, now);
    applyStyleProperty(PropertyKey::LineTranslateAnchor, line.translateAnchor, z, now);
    applyTransitionedStyleProperty(PropertyKey::LineWidth, line.width, z, now);
    applyTransitionedStyleProperty(PropertyKey::LineOffset, line.offset, z, now);
    applyTransitionedStyleProperty(PropertyKey::LineBlur, line.blur, z, now);
    applyTransitionedStyleProperty(PropertyKey::LineDashLand, line.dash_array[0], z, now);
    applyTransitionedStyleProperty(PropertyKey::LineDashGap, line.dash_array[1], z, now);
    applyStyleProperty(PropertyKey::LineImage, line.image, z, now);
}
Example #4
0
void StyleLayer::applyStyleProperties<BackgroundProperties>(const float z, const timestamp now) {
    properties.set<BackgroundProperties>();
    BackgroundProperties &background = properties.get<BackgroundProperties>();
    applyTransitionedStyleProperty(PropertyKey::BackgroundOpacity, background.opacity, z, now);
    applyTransitionedStyleProperty(PropertyKey::BackgroundColor, background.color, z, now);
    applyStyleProperty(PropertyKey::BackgroundImage, background.image, z, now);
}
void StyleLayer::applyStyleProperties<BackgroundProperties>(const float z, const TimePoint now, const ZoomHistory &zoomHistory) {
    properties.set<BackgroundProperties>();
    BackgroundProperties &background = properties.get<BackgroundProperties>();
    applyTransitionedStyleProperty(PropertyKey::BackgroundOpacity, background.opacity, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::BackgroundColor, background.color, z, now, zoomHistory);
    applyStyleProperty(PropertyKey::BackgroundImage, background.image, z, now, zoomHistory);
}
void StyleLayer::applyStyleProperties<LineProperties>(const float z, const TimePoint now, const ZoomHistory &zoomHistory) {
    properties.set<LineProperties>();
    LineProperties &line = properties.get<LineProperties>();
    applyTransitionedStyleProperty(PropertyKey::LineOpacity, line.opacity, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::LineColor, line.color, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::LineTranslate, line.translate, z, now, zoomHistory);
    applyStyleProperty(PropertyKey::LineTranslateAnchor, line.translateAnchor, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::LineWidth, line.width, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::LineGapWidth, line.gap_width, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::LineBlur, line.blur, z, now, zoomHistory);
    applyStyleProperty(PropertyKey::LineDashArray, line.dash_array, z, now, zoomHistory);
    applyStyleProperty(PropertyKey::LineImage, line.image, z, now, zoomHistory);

    // for scaling dasharrays
    applyStyleProperty(PropertyKey::LineWidth, line.dash_line_width, std::floor(z), TimePoint::max(), zoomHistory);
}
void StyleLayer::applyStyleProperties<SymbolProperties>(const float z, const TimePoint now, const ZoomHistory &zoomHistory) {
    properties.set<SymbolProperties>();
    SymbolProperties &symbol = properties.get<SymbolProperties>();
    applyTransitionedStyleProperty(PropertyKey::IconOpacity, symbol.icon.opacity, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::IconSize, symbol.icon.size, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::IconColor, symbol.icon.color, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::IconHaloColor, symbol.icon.halo_color, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::IconHaloWidth, symbol.icon.halo_width, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::IconHaloBlur, symbol.icon.halo_blur, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::IconTranslate, symbol.icon.translate, z, now, zoomHistory);
    applyStyleProperty(PropertyKey::IconTranslateAnchor, symbol.icon.translate_anchor, z, now, zoomHistory);

    applyTransitionedStyleProperty(PropertyKey::TextOpacity, symbol.text.opacity, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::TextSize, symbol.text.size, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::TextColor, symbol.text.color, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::TextHaloColor, symbol.text.halo_color, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::TextHaloWidth, symbol.text.halo_width, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::TextHaloBlur, symbol.text.halo_blur, z, now, zoomHistory);
    applyTransitionedStyleProperty(PropertyKey::TextTranslate, symbol.text.translate, z, now, zoomHistory);
    applyStyleProperty(PropertyKey::TextTranslateAnchor, symbol.text.translate_anchor, z, now, zoomHistory);
}
Example #8
0
void StyleLayer::applyStyleProperties<SymbolProperties>(const float z, const timestamp now) {
    properties.set<SymbolProperties>();
    SymbolProperties &symbol = properties.get<SymbolProperties>();
    applyTransitionedStyleProperty(PropertyKey::IconOpacity, symbol.icon.opacity, z, now);
    applyTransitionedStyleProperty(PropertyKey::IconRotate, symbol.icon.rotate, z, now);
    applyTransitionedStyleProperty(PropertyKey::IconSize, symbol.icon.size, z, now);
    applyTransitionedStyleProperty(PropertyKey::IconColor, symbol.icon.color, z, now);
    applyTransitionedStyleProperty(PropertyKey::IconHaloColor, symbol.icon.halo_color, z, now);
    applyTransitionedStyleProperty(PropertyKey::IconHaloWidth, symbol.icon.halo_width, z, now);
    applyTransitionedStyleProperty(PropertyKey::IconHaloBlur, symbol.icon.halo_blur, z, now);
    applyTransitionedStyleProperty(PropertyKey::IconTranslateX, symbol.icon.translate[0], z, now);
    applyTransitionedStyleProperty(PropertyKey::IconTranslateY, symbol.icon.translate[1], z, now);
    applyStyleProperty(PropertyKey::IconTranslateAnchor, symbol.icon.translate_anchor, z, now);

    applyTransitionedStyleProperty(PropertyKey::TextOpacity, symbol.text.opacity, z, now);
    applyTransitionedStyleProperty(PropertyKey::TextSize, symbol.text.size, z, now);
    applyTransitionedStyleProperty(PropertyKey::TextColor, symbol.text.color, z, now);
    applyTransitionedStyleProperty(PropertyKey::TextHaloColor, symbol.text.halo_color, z, now);
    applyTransitionedStyleProperty(PropertyKey::TextHaloWidth, symbol.text.halo_width, z, now);
    applyTransitionedStyleProperty(PropertyKey::TextHaloBlur, symbol.text.halo_blur, z, now);
    applyTransitionedStyleProperty(PropertyKey::TextTranslateX, symbol.text.translate[0], z, now);
    applyTransitionedStyleProperty(PropertyKey::TextTranslateY, symbol.text.translate[1], z, now);
    applyStyleProperty(PropertyKey::TextTranslateAnchor, symbol.text.translate_anchor, z, now);
}