From 9acb2fe3a0a59c1e0664c4694a286a1a6412c380 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Mon, 2 Jul 2018 18:10:06 +0200 Subject: [PATCH] Fix AddArcToPoint when no current point is set on wxGraphicsPath Current behavior of AddArcToPoint() when there is no current point is not documented and moreover it is not the same in native macOS and in generic implementation. Under macOS nothing is done and "no current point" error is raised but under other ports (generic implementation) only arc is drawn (without initial line). When there is no current point, in similar functions AddCurveToPoint(), AddQuadCurveToPoint() it is initially set to the some known control point of the curve but this approach cannot be applied to AddArcToPoint(). The only well defined fallback point seems to be (0, 0) and this option is implemented here. See #18086. --- docs/doxygen/images/drawing-addarctopoint.png | Bin 3386 -> 3242 bytes interface/wx/graphics.h | 2 ++ src/common/graphcmn.cpp | 6 ++++++ src/osx/carbon/graphics.cpp | 6 ++++++ 4 files changed, 14 insertions(+) diff --git a/docs/doxygen/images/drawing-addarctopoint.png b/docs/doxygen/images/drawing-addarctopoint.png index e3aa71932a168a6e39f4fbe5be752d77934ed77e..96570d4b08db3f0f7639f11efd4fd38a780904f4 100644 GIT binary patch literal 3242 zcmV;b3{~@qP)S8 z))2&x1Ss2WtLhakQ1^9#U=6s3FbY`}o+d(WKldz;@sY;2$L$B)17^FHtMKKEV* zn5<=_fz!Zg;FJK{Ha_oS9C$#vsY2l=@d*$EOaluZa^t=(ho7w65qgGQV5vodQt=f| z!3IH|xC8J*rh&ykQ(h3N6bm0Z}%240_>)${G zv+_86Cu14rnFhvTJjMH#sl81&&h|)mB6KGa6<Y*Ti2c`4cQv84V(@y)48m6!=w%F4>R-%P-d6W}Z}0V}+$YvO+Zc-BO~;|j2k#6o5PK16tPiU9VW zDKZDJK!BCNy`1;GX^w%TF6aIuN?a+td=i8r#6B=-uCbL-WN>KG48SKX4 zx>l8dNmxHKi&zI<-)4OL6?4VIbst?J{m)bZJOa^jVUlIw+D#p?eDG!w0BXY_lafI%p zg>heqRlW6k`)5-HTTl1USY_X@eXHukXyNa7(?x ze`RFwmgMD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