From e8a21cb10745df9a5eed2cdf603c83b64f622903 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 e64abb55da212..ff8f7be3134c6 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" @@ -857,7 +858,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 74875511528e769d71070de9fe6ebc5d9b108747 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Fri, 14 Nov 2025 16:00:25 +0100 Subject: [PATCH 2/2] Adjust stressGraphics_web.ref for waves --- 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 f526abfdca92c..dbe19e92d7664 100644 --- a/test/stressGraphics_web.ref +++ b/test/stressGraphics_web.ref @@ -32,7 +32,7 @@ Test# SVG1Ref# SVG1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN 31 8643 174 13191 551 37607 7570 23743 4170 8643 174 32 12629 52 20641 219 89532 21704 58976 13483 12600 80 33 33040 69 50688 694 125388 21334 98573 19359 32994 148 - 34 1111600 100 3933582 50 248290 61958 298343 100544 1124318 700 + 34 1124344 100 3981172 50 248290 61958 298343 100544 1124318 700 35 3851 100 9012 300 40000 11000 37000 9000 3851 100 36 11750 100 41000 300 73043 25000 90000 37000 11725 100 37 26771 100 82724 3000 77792 25000 72945 24000 26771 100