]> granicus.if.org Git - graphviz/commitdiff
tests: SVGAnalyzer: correct fallback to bevel in SVGElement::miter_point
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Mon, 10 Oct 2022 06:41:06 +0000 (08:41 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 11 Oct 2022 19:45:27 +0000 (21:45 +0200)
This corrects a mistake made in a8b2c299931c9c7037a67e9064b4749390655c0c.

tests/svg_element.cpp

index d2eae728c93d1d0edb22f33b61d8839e19a9637c..5e1b2d9d5620036dd527531bbb67653d17580d3d 100644 (file)
@@ -842,7 +842,7 @@ SVG::SVGElement::miter_point(SVG::SVGPoint segment_start,
     const auto sinBetaMinusPi = -sinBeta;
     const auto cosBetaMinusPi = -cosBeta;
     const SVG::SVGPoint P2 = {P.x + stroke_width / 2.0 * sinBetaMinusPi,
-                              P.y + stroke_width / 2.0 * cosBetaMinusPi};
+                              P.y - stroke_width / 2.0 * cosBetaMinusPi};
 
     // the bevel is the triangle formed from the three points P, P1 and P2 so
     // a good enough approximation of the miter point in this case is the