From 6a0124fbf536d21c64eb8cb2a28fa4e72568ff04 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Fri, 14 Nov 2025 15:49:35 +0100 Subject: [PATCH 1/2] [webcanv] fix storage of TF1 values One cannot use default 0,0 values while than smaller buffer is allocated and it not recognized by painters later --- gui/webgui6/src/TWebCanvas.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gui/webgui6/src/TWebCanvas.cxx b/gui/webgui6/src/TWebCanvas.cxx index 63922a8cad541..1e6bbbf3584c3 100644 --- a/gui/webgui6/src/TWebCanvas.cxx +++ b/gui/webgui6/src/TWebCanvas.cxx @@ -34,6 +34,7 @@ #include "TList.h" #include "TF1.h" #include "TF2.h" +#include "TF3.h" #include "TH1.h" #include "TH2.h" #include "THStack.h" @@ -858,7 +859,14 @@ void TWebCanvas::CreatePadSnapshot(TPadWebSnapshot &paddata, TPad *pad, Long64_t if ((fTF1UseSave == 1) && f1->HasSave()) return; - f1->Save(0, 0, 0, 0, 0, 0); + auto f3 = dynamic_cast(f1); + auto f2 = dynamic_cast(f1); + if (f3) + f3->Save(f3->GetXmin(), f3->GetXmax(), f3->GetYmin(), f3->GetYmax(), f3->GetZmin(), f3->GetZmax()); + else if (f2) + f2->Save(f2->GetXmin(), f2->GetXmax(), f2->GetYmin(), f2->GetYmax(), 0, 0); + else + f1->Save(f1->GetXmin(), f1->GetXmax(), 0, 0, 0, 0); }; auto create_stats = [&]() { From 479975e18becfffffb49d6f58fcf3ee86bd984ac Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Fri, 14 Nov 2025 15:50:58 +0100 Subject: [PATCH 2/2] Adjust stressGraphics_web.ref file --- test/stressGraphics_web.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/stressGraphics_web.ref b/test/stressGraphics_web.ref index 91ca745114705..65720eaf387e2 100644 --- a/test/stressGraphics_web.ref +++ b/test/stressGraphics_web.ref @@ -45,7 +45,7 @@ gmultierrors 4812 50 9590 200 51664 20000 27741 8000 4812 50 tmultigraph1 12629 52 20641 219 89532 21704 58976 13483 12600 80 tmultigraph2 33040 69 50688 694 125388 21334 98573 19359 32994 148 - waves 1111600 100 3933582 50 248290 61958 298343 100544 1124318 700 + waves 1124344 100 3981172 50 248290 61958 298343 100544 1124318 700 tf12 3851 100 9012 300 40000 11000 37000 9000 3851 100 tspline 11750 100 41000 300 73043 25000 90000 37000 11725 100 tscatter 26771 100 82724 3000 77792 25000 72945 24000 26771 100