Skip to content

Commit

Permalink
Fix rounding problem in circle drawing in latex parser
Browse files Browse the repository at this point in the history
Used only for #odot processing

Fixes: https://root-forum.cern.ch/t/55967
  • Loading branch information
linev committed Aug 9, 2023
1 parent c15efc8 commit ff5aed5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graf2d/graf/src/TLatex.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1993,8 +1993,8 @@ void TLatex::DrawCircle(Double_t x1, Double_t y1, Double_t r, TextSpec_t spec )
angle = Double_t(i)*dphi;
dx = r*TMath::Cos(angle) +x1 -xOrigin;
dy = r*TMath::Sin(angle) +y1 -yOrigin;
x[i] = gPad->AbsPixeltoX(Int_t( dx*cosang+ dy*sinang +xOrigin));
y[i] = gPad->AbsPixeltoY(Int_t(-dx*sinang+ dy*cosang +yOrigin));
x[i] = gPad->AbsPixeltoX(TMath::Nint( dx*cosang+ dy*sinang +xOrigin));
y[i] = gPad->AbsPixeltoY(TMath::Nint(-dx*sinang+ dy*cosang +yOrigin));
}
gPad->PaintPolyLine(np+1,x,y);
}
Expand Down

0 comments on commit ff5aed5

Please sign in to comment.