Files
MapLibreParticleLab/src/mbgl/style/property_fallback.cpp
2015-02-03 16:09:58 -08:00

103 lines
7.6 KiB
C++

#include <mbgl/style/property_fallback.hpp>
#include <mbgl/style/style_properties.hpp>
#include <mbgl/style/style_bucket.hpp>
namespace mbgl {
const std::map<PropertyKey, PropertyValue> PropertyFallbackValue::properties = {
{ PropertyKey::FillAntialias, defaultStyleProperties<FillProperties>().antialias },
{ PropertyKey::FillOpacity, defaultStyleProperties<FillProperties>().opacity },
{ PropertyKey::FillColor, defaultStyleProperties<FillProperties>().fill_color },
// no FillOutlineColor on purpose.
{ PropertyKey::FillTranslateX, defaultStyleProperties<FillProperties>().translate[0] },
{ PropertyKey::FillTranslateY, defaultStyleProperties<FillProperties>().translate[1] },
{ PropertyKey::FillTranslateAnchor, defaultStyleProperties<FillProperties>().translateAnchor },
{ PropertyKey::LineOpacity, defaultStyleProperties<LineProperties>().opacity },
{ PropertyKey::LineColor, defaultStyleProperties<LineProperties>().color },
{ PropertyKey::LineTranslateX, defaultStyleProperties<LineProperties>().translate[0] },
{ PropertyKey::LineTranslateY, defaultStyleProperties<LineProperties>().translate[1] },
{ PropertyKey::LineTranslateAnchor, defaultStyleProperties<LineProperties>().translateAnchor },
{ PropertyKey::LineWidth, defaultStyleProperties<LineProperties>().width },
{ PropertyKey::LineGapWidth, defaultStyleProperties<LineProperties>().gap_width },
{ PropertyKey::LineBlur, defaultStyleProperties<LineProperties>().blur },
{ PropertyKey::IconOpacity, defaultStyleProperties<SymbolProperties>().icon.opacity },
{ PropertyKey::IconRotate, defaultStyleProperties<SymbolProperties>().icon.rotate },
{ PropertyKey::IconSize, defaultStyleProperties<SymbolProperties>().icon.size },
{ PropertyKey::IconColor, defaultStyleProperties<SymbolProperties>().icon.color },
{ PropertyKey::IconHaloColor, defaultStyleProperties<SymbolProperties>().icon.halo_color },
{ PropertyKey::IconHaloWidth, defaultStyleProperties<SymbolProperties>().icon.halo_width },
{ PropertyKey::IconHaloBlur, defaultStyleProperties<SymbolProperties>().icon.halo_blur },
{ PropertyKey::IconTranslateX, defaultStyleProperties<SymbolProperties>().icon.translate[0] },
{ PropertyKey::IconTranslateY, defaultStyleProperties<SymbolProperties>().icon.translate[1] },
{ PropertyKey::IconTranslateAnchor, defaultStyleProperties<SymbolProperties>().icon.translate_anchor },
{ PropertyKey::TextOpacity, defaultStyleProperties<SymbolProperties>().text.opacity },
{ PropertyKey::TextSize, defaultStyleProperties<SymbolProperties>().text.size },
{ PropertyKey::TextColor, defaultStyleProperties<SymbolProperties>().text.color },
{ PropertyKey::TextHaloColor, defaultStyleProperties<SymbolProperties>().text.halo_color },
{ PropertyKey::TextHaloWidth, defaultStyleProperties<SymbolProperties>().text.halo_width },
{ PropertyKey::TextHaloBlur, defaultStyleProperties<SymbolProperties>().text.halo_blur },
{ PropertyKey::TextTranslateX, defaultStyleProperties<SymbolProperties>().text.translate[0] },
{ PropertyKey::TextTranslateY, defaultStyleProperties<SymbolProperties>().text.translate[1] },
{ PropertyKey::TextTranslateAnchor, defaultStyleProperties<SymbolProperties>().text.translate_anchor },
{ PropertyKey::RasterOpacity, defaultStyleProperties<RasterProperties>().opacity },
{ PropertyKey::RasterHueRotate, defaultStyleProperties<RasterProperties>().hue_rotate },
{ PropertyKey::RasterBrightnessLow, defaultStyleProperties<RasterProperties>().brightness[0] },
{ PropertyKey::RasterBrightnessHigh, defaultStyleProperties<RasterProperties>().brightness[1] },
{ PropertyKey::RasterSaturation, defaultStyleProperties<RasterProperties>().saturation },
{ PropertyKey::RasterContrast, defaultStyleProperties<RasterProperties>().contrast },
{ PropertyKey::RasterFade, defaultStyleProperties<RasterProperties>().fade },
{ PropertyKey::BackgroundOpacity, defaultStyleProperties<BackgroundProperties>().opacity },
{ PropertyKey::BackgroundColor, defaultStyleProperties<BackgroundProperties>().color },
{ PropertyKey::LineCap, defaultLayoutProperties<StyleBucketLine>().cap },
{ PropertyKey::LineJoin, defaultLayoutProperties<StyleBucketLine>().join },
{ PropertyKey::LineMiterLimit, defaultLayoutProperties<StyleBucketLine>().miter_limit },
{ PropertyKey::LineRoundLimit, defaultLayoutProperties<StyleBucketLine>().round_limit },
{ PropertyKey::SymbolPlacement, defaultLayoutProperties<StyleBucketSymbol>().placement },
{ PropertyKey::SymbolMinDistance, defaultLayoutProperties<StyleBucketSymbol>().min_distance },
{ PropertyKey::SymbolAvoidEdges, defaultLayoutProperties<StyleBucketSymbol>().avoid_edges },
{ PropertyKey::IconAllowOverlap, defaultLayoutProperties<StyleBucketSymbol>().icon.allow_overlap },
{ PropertyKey::IconIgnorePlacement, defaultLayoutProperties<StyleBucketSymbol>().icon.ignore_placement },
{ PropertyKey::IconOptional, defaultLayoutProperties<StyleBucketSymbol>().icon.optional },
{ PropertyKey::IconRotationAlignment, defaultLayoutProperties<StyleBucketSymbol>().icon.rotation_alignment },
{ PropertyKey::IconMaxSize, defaultLayoutProperties<StyleBucketSymbol>().icon.max_size },
{ PropertyKey::IconImage, defaultLayoutProperties<StyleBucketSymbol>().icon.image },
{ PropertyKey::IconRotate, defaultLayoutProperties<StyleBucketSymbol>().icon.rotate },
{ PropertyKey::IconPadding, defaultLayoutProperties<StyleBucketSymbol>().icon.padding },
{ PropertyKey::IconKeepUpright, defaultLayoutProperties<StyleBucketSymbol>().icon.keep_upright },
{ PropertyKey::IconOffsetX, defaultLayoutProperties<StyleBucketSymbol>().icon.offset[0] },
{ PropertyKey::IconOffsetY, defaultLayoutProperties<StyleBucketSymbol>().icon.offset[1] },
{ PropertyKey::TextRotationAlignment, defaultLayoutProperties<StyleBucketSymbol>().text.rotation_alignment },
{ PropertyKey::TextField, defaultLayoutProperties<StyleBucketSymbol>().text.field },
{ PropertyKey::TextFont, defaultLayoutProperties<StyleBucketSymbol>().text.font },
{ PropertyKey::TextMaxSize, defaultLayoutProperties<StyleBucketSymbol>().text.max_size },
{ PropertyKey::TextMaxWidth, defaultLayoutProperties<StyleBucketSymbol>().text.max_width },
{ PropertyKey::TextLineHeight, defaultLayoutProperties<StyleBucketSymbol>().text.line_height },
{ PropertyKey::TextLetterSpacing, defaultLayoutProperties<StyleBucketSymbol>().text.letter_spacing },
{ PropertyKey::TextJustify, defaultLayoutProperties<StyleBucketSymbol>().text.justify },
{ PropertyKey::TextAnchor, defaultLayoutProperties<StyleBucketSymbol>().text.anchor },
{ PropertyKey::TextMaxAngle, defaultLayoutProperties<StyleBucketSymbol>().text.max_angle },
{ PropertyKey::TextRotate, defaultLayoutProperties<StyleBucketSymbol>().text.rotate },
{ PropertyKey::TextPadding, defaultLayoutProperties<StyleBucketSymbol>().text.padding },
{ PropertyKey::TextKeepUpright, defaultLayoutProperties<StyleBucketSymbol>().text.keep_upright },
{ PropertyKey::TextTransform, defaultLayoutProperties<StyleBucketSymbol>().text.transform },
{ PropertyKey::TextOffsetX, defaultLayoutProperties<StyleBucketSymbol>().text.offset[0] },
{ PropertyKey::TextOffsetY, defaultLayoutProperties<StyleBucketSymbol>().text.offset[1] },
{ PropertyKey::TextAllowOverlap, defaultLayoutProperties<StyleBucketSymbol>().text.allow_overlap },
{ PropertyKey::TextIgnorePlacement, defaultLayoutProperties<StyleBucketSymbol>().text.ignore_placement },
{ PropertyKey::TextOptional, defaultLayoutProperties<StyleBucketSymbol>().text.optional },
};
const PropertyValue PropertyFallbackValue::defaultProperty = false;
}