diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-26 16:39:56 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-02 14:51:39 -0700 |
commit | c902f9098b331302aaa1baac77d1575db624a132 (patch) | |
tree | 211901cd04454aedbac40c469198438e46d7038c /include/mbgl/style/types.hpp | |
parent | 18149cbcc27a926f280b08d8d0e09104b2147688 (diff) | |
download | qtlocation-mapboxgl-c902f9098b331302aaa1baac77d1575db624a132.tar.gz |
[core] Rationalize naming for style-related code
Diffstat (limited to 'include/mbgl/style/types.hpp')
-rw-r--r-- | include/mbgl/style/types.hpp | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp index 56f3570357..27b524a800 100644 --- a/include/mbgl/style/types.hpp +++ b/include/mbgl/style/types.hpp @@ -2,44 +2,9 @@ #include <mbgl/util/enum.hpp> -#include <string> -#include <array> -#include <vector> -#include <utility> - namespace mbgl { -// Stores a premultiplied color, with all four channels ranging from 0..1 -using Color = std::array<float, 4>; - -// An array of font names -using FontStack = std::vector<std::string>; - -std::string fontStackToString(const FontStack&); - -struct FontStackHash { - std::size_t operator()(const FontStack&) const; -}; - -template <typename T> -class Function { -public: - using Stop = std::pair<float, T>; - using Stops = std::vector<Stop>; - - explicit Function(const Stops& stops_, float base_) - : base(base_), stops(stops_) {} - - float getBase() const { return base; } - const std::vector<std::pair<float, T>>& getStops() const { return stops; } - -private: - float base = 1; - std::vector<std::pair<float, T>> stops; -}; - -// ------------------------------------------------------------------------------------------------- - +// TODO: should be in public source.hpp header and style namespace enum class SourceType : uint8_t { Vector, Raster, @@ -56,7 +21,7 @@ MBGL_DEFINE_ENUM_CLASS(SourceTypeClass, SourceType, { { SourceType::Annotations, "annotations" }, }); -// ------------------------------------------------------------------------------------------------- +namespace style { enum class VisibilityType : bool { Visible, @@ -122,5 +87,5 @@ enum class TextTransformType : uint8_t { Lowercase, }; +} // namespace style } // namespace mbgl - |