cesium-native 0.50.0
Loading...
Searching...
No Matches
VectorStyle.h
1#pragma once
2
3#include <CesiumUtility/Color.h>
4
5#include <optional>
6
7namespace CesiumVectorData {
8
12enum class ColorMode : uint8_t {
14 Normal = 0,
26};
27
46
48enum class LineWidthMode : uint8_t {
53 Pixels = 0,
63};
64
78
85 std::optional<ColorStyle> fill;
90 std::optional<LineStyle> outline;
91};
92
105
109 VectorStyle() = default;
110
114 VectorStyle(const LineStyle& lineStyle, const PolygonStyle& polygonStyle);
115
120};
121} // namespace CesiumVectorData
Classes for loading vector data such as GeoJSON.
LineWidthMode
The mode to use when interpreting a given line width.
Definition VectorStyle.h:48
@ Meters
The line width will cover this number of meters of the ellipsoid it's rendered on....
Definition VectorStyle.h:62
@ Pixels
The line will always be this number of pixels in width, no matter how close the user gets to the line...
Definition VectorStyle.h:53
ColorMode
The mode used for coloring.
Definition VectorStyle.h:12
@ Random
The color will be chosen randomly.
Definition VectorStyle.h:25
@ Normal
The normal color mode. The color will be used directly.
Definition VectorStyle.h:14
Represents an RGBA color value.
Definition Color.h:9
Specifies the color of a style type.
Definition VectorStyle.h:31
ColorMode colorMode
The color mode to be used.
Definition VectorStyle.h:35
CesiumUtility::Color getColor() const
Obtains the color specified on this ColorStyle.
CesiumUtility::Color color
The color to be used.
Definition VectorStyle.h:33
The style used to draw polylines and strokes.
Definition VectorStyle.h:66
double width
The width of this line. If widthMode is set to LineWidthMode::Pixels, this is in pixels....
Definition VectorStyle.h:72
LineWidthMode widthMode
The mode to use when interpreting width.
Definition VectorStyle.h:76
The style used to draw a Polygon.
Definition VectorStyle.h:80
std::optional< ColorStyle > fill
The color used to fill this polygon. If std::nullopt, the polygon will not be filled.
Definition VectorStyle.h:85
std::optional< LineStyle > outline
The style used to outline this polygon. If std::nullopt, the polygon will not be outlined.
Definition VectorStyle.h:90
LineStyle line
The style to use when drawing polylines.
VectorStyle()=default
Default constructor for VectorStyle.
VectorStyle(const LineStyle &lineStyle, const PolygonStyle &polygonStyle)
Initializes style information for all types.
PolygonStyle polygon
The style to use when drawing polygons.
VectorStyle(const CesiumUtility::Color &color)
Initializes all styles to the given color.