3#include "VectorStyle.h"
5#include <CesiumGeometry/Rectangle.h>
6#include <CesiumGeospatial/CartographicPolygon.h>
7#include <CesiumGeospatial/Ellipsoid.h>
8#include <CesiumGeospatial/GlobeRectangle.h>
9#include <CesiumGltf/ImageAsset.h>
10#include <CesiumUtility/Color.h>
11#include <CesiumUtility/IntrusivePointer.h>
12#include <CesiumUtility/ReferenceCounted.h>
13#include <CesiumVectorData/GeoJsonObject.h>
16#include <blend2d/context.h>
17#include <blend2d/image.h>
44 uint32_t mipLevel = 0,
68 const std::vector<std::vector<glm::dvec3>>& polygon,
79 const std::span<const glm::dvec3>& points,
126 bool _finalized =
false;
A 2D polygon expressed as a list of longitude/latitude coordinates in radians.
A quadratic surface defined in Cartesian coordinates.
static const Ellipsoid WGS84
An Ellipsoid instance initialized to the WGS84 standard.
A two-dimensional, rectangular region on a globe, specified using longitude and latitude coordinates....
A smart pointer that calls addReference and releaseReference on the controlled object.
void drawPolygon(const CesiumGeospatial::CartographicPolygon &polygon, const PolygonStyle &style)
Draws a CesiumGeospatial::CartographicPolygon to the canvas.
CesiumUtility::IntrusivePointer< CesiumGltf::ImageAsset > finalize()
Finalizes the rasterization operations, flushing all draw calls to the canvas, ensuring proper pixel ...
void drawPolyline(const std::span< const glm::dvec3 > &points, const LineStyle &style)
Draws a polyline (a set of multiple line segments) to the canvas.
void clear(const CesiumUtility::Color &clearColor)
Fills the entire canvas with the given color.
VectorRasterizer(const CesiumGeospatial::GlobeRectangle &bounds, CesiumUtility::IntrusivePointer< CesiumGltf::ImageAsset > &imageAsset, uint32_t mipLevel=0, const CesiumGeospatial::Ellipsoid &ellipsoid=CesiumGeospatial::Ellipsoid::WGS84)
Creates a new VectorRasterizer representing the given rectangle on the globe.
void drawPolygon(const std::vector< std::vector< glm::dvec3 > > &polygon, const PolygonStyle &style)
Draws a set of linear rings representing a polygon and its holes to the canvas.
void drawGeoJsonObject(const GeoJsonObject &geoJsonObject, const VectorStyle &style)
Rasterizes a GeoJsonObject to the canvas.
Classes for loading vector data such as GeoJSON.
Represents an RGBA color value.
An object in a GeoJSON document.
The style used to draw polylines and strokes.
The style used to draw a Polygon.
Style information to use when drawing vector data.