MCPcopy Create free account
hub / github.com/CesiumGS/cesium-native / drawPointsImpl

Function drawPointsImpl

CesiumVectorData/src/VectorRasterizer.cpp:307–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305
306namespace {
307void drawPointsImpl(
308 BLContext& context,
309 const CesiumGeospatial::Ellipsoid& ellipsoid,
310 const GlobeRectangle& bounds,
311 const std::vector<BLPoint>& vertices,
312 const std::vector<size_t>& seeds,
313 const PointStyle& style) {
314 if (style.fill) {
315 for (size_t i = 0; i < vertices.size(); i++) {
316 context.fillCircle(
317 BLCircle(vertices[i].x, vertices[i].y, style.radius),
318 BLRgba32(style.fill->getColor(seeds[i]).toRgba32()));
319 }
320 }
321
322 if (style.outline) {
323 setStrokeWidth(context, *style.outline, ellipsoid, bounds);
324
325 for (size_t i = 0; i < vertices.size(); i++) {
326 context.strokeCircle(
327 BLCircle(vertices[i].x, vertices[i].y, style.radius),
328 BLRgba32(style.outline->getColor(seeds[i] ^ 31).toRgba32()));
329 }
330 }
331}
332} // namespace
333
334void VectorRasterizer::drawPoints(

Callers 1

drawPointsMethod · 0.85

Calls 4

setStrokeWidthFunction · 0.85
toRgba32Method · 0.80
getColorMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected