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

Method Redraw

core/graphics/XChart.cpp:699–720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

697}
698
699void XChart::Redraw() {
700 if(!canvasContext_->IsValid()) {
701 return;
702 }
703 auto startTimeStamp = xg::CurrentTimestampAtMM();
704
705 // 7.-1 beforeDraw
706 // this->logTracer_->trace("%s", "before Redraw and call canvas clearRect");
707 // canvasContext_->ClearRect(margin_[0], margin_[1], width_, height_);
708
709 this->legendController_->Redraw(*this);
710
711 // 6. canvas draw
712 this->logTracer_->trace("%s", "canvas#start Redraw");
713 this->canvasContext_->Reset();
714 this->canvas_->Draw(GetCanvasContext());
715
716 renderDurationMM_ = xg::CurrentTimestampAtMM() - startTimeStamp;
717
718 long count = this->canvasContext_->GetRenderCount();
719 this->logTracer_->trace("%s renderCount: %ld, duration: %lums", "canvas#endRedraw", count, renderDurationMM_);
720}
721
722std::map<std::string, std::vector<legend::LegendItem>> XChart::GetLegendItems() {
723

Callers

nothing calls this directly

Calls 6

CurrentTimestampAtMMFunction · 0.85
traceMethod · 0.80
GetRenderCountMethod · 0.80
IsValidMethod · 0.45
ResetMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected