MCPcopy Create free account
hub / github.com/antvis/F2Native / CalculateBox

Method CalculateBox

core/graphics/shape/Marker.cpp:23–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23BBox xg::shape::Marker::CalculateBox(canvas::CanvasContext &context) const {
24 BBox bbox;
25 if (symbol_ == "rect") {
26 bbox.minX = point_.x - size_.width / 2;
27 bbox.maxX = point_.x + size_.width / 2;
28 bbox.minY = point_.y - size_.height / 2;
29 bbox.maxY = point_.y + size_.height / 2;
30 } else {
31 bbox.minX = point_.x - radius_;
32 bbox.maxX = point_.x + radius_;
33 bbox.minY = point_.y - radius_;
34 bbox.maxY = point_.y + radius_;
35 }
36 bbox.x = point_.x;
37 bbox.y = point_.y;
38 return bbox;
39}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected