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

Method ClearInner

core/graphics/XChart.cpp:675–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673}
674
675void XChart::ClearInner() {
676
677 std::for_each(geoms_.begin(), geoms_.end(), [this](auto &geom) { geom->Clear(); });
678
679 this->legendController_->ClearInner();
680 this->guideController_->ClearInner();
681
682 this->padding_ = userPadding_;
683
684 if(this->coord_ != nullptr) {
685 util::Point start = util::Point{this->margin_[0] + this->padding_[0], this->margin_[1] + this->height_ - this->padding_[3]};
686 util::Point end = util::Point{this->margin_[0] + this->width_ - this->padding_[2], this->margin_[1] + this->padding_[1]};
687
688 this->coord_->Reset(start, end);
689 }
690
691 NotifyAction(ACTION_CHART_CLEAR_INNER);
692
693 axisController_->Clear();
694 if(canvasContext_ != nullptr) {
695 canvasContext_->Reset();
696 }
697}
698
699void XChart::Redraw() {
700 if(!canvasContext_->IsValid()) {

Callers

nothing calls this directly

Calls 4

beginMethod · 0.80
endMethod · 0.80
ClearMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected