Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions graf2d/postscript/src/TSVG.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
Int_t TSVG::fgLineJoin = 0;
Int_t TSVG::fgLineCap = 0;

const Double_t kEpsilon = 1e-9;

/** \class TSVG
\ingroup PS

Expand Down Expand Up @@ -468,6 +470,10 @@ void TSVG::DrawPolyLine(Int_t nn, TPoints *xy)
iydi = YtoSVG(xy[i].GetY());
ix = ixdi - ixd0;
iy = iydi - iyd0;
if (fCompact && (TMath::Abs(ix) < kEpsilon))
ix = 0;
if (fCompact && (TMath::Abs(iy) < kEpsilon))
iy = 0;
ixd0 = ixdi;
iyd0 = iydi;
if( ix && iy) {
Expand Down Expand Up @@ -538,6 +544,10 @@ void TSVG::DrawPolyLineNDC(Int_t nn, TPoints *xy)
iydi = VtoSVG(xy[i].GetY());
ix = ixdi - ixd0;
iy = iydi - iyd0;
if (fCompact && (TMath::Abs(ix) < kEpsilon))
ix = 0;
if (fCompact && (TMath::Abs(iy) < kEpsilon))
iy = 0;
ixd0 = ixdi;
iyd0 = iydi;
if( ix && iy) {
Expand Down Expand Up @@ -1442,6 +1452,10 @@ void TSVG::DrawPS(Int_t nn, Double_t *xw, Double_t *yw)
iydi = YtoSVG(yw[i]);
ix = ixdi - ixd0;
iy = iydi - iyd0;
if (fCompact && (TMath::Abs(ix) < kEpsilon))
ix = 0;
if (fCompact && (TMath::Abs(iy) < kEpsilon))
iy = 0;
ixd0 = ixdi;
iyd0 = iydi;
if( ix && iy) {
Expand Down
7 changes: 6 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ROOT_EXECUTABLE(eventexe MainEvent.cxx LIBRARIES Event RIO Tree TreePlayer Hist
ROOT_ADD_TEST(test-event COMMAND eventexe)

#---guitest------------------------------------------------------------------------------------
if(TARGET Gui)
if(TARGET Gui)
ROOT_EXECUTABLE(guitest guitest.cxx LIBRARIES RIO Gui Gpad Hist)
endif()

Expand Down Expand Up @@ -183,6 +183,11 @@ if(ROOT_opengl_FOUND AND TARGET TreeViewer)
COMMAND ${ROOT_root_CMD} -b --web=off -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressGraphics.cxx
FAILREGEX "FAILED|Error in"
DEPENDS test-stressgraphics)
ROOT_ADD_TEST(test-stressgraphics-svg
ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}
COMMAND stressGraphics -b --web=off -p=svg --svg=${CMAKE_CURRENT_SOURCE_DIR}/svg_ref/
FAILREGEX "FAILED|Error in"
LABELS longtest)
if(CHROME_EXECUTABLE)
ROOT_ADD_TEST(test-stressgraphics-chrome
RUN_SERIAL
Expand Down
Loading
Loading