From 37af51c51382b8c28cfb250b63e2fa320da5d0d3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 27 May 2021 23:45:02 +0200 Subject: [PATCH] Document that wxDC::DrawSpline() requires at least 3 points This is the case for wxMSW implementation and while the other ones seem to accept 1 or 2 points too, document the most stringent requirement, especially because not satisfying it results not "just" in assertion failure, but also in a crash in wxMSW. This should obviously be improved further by, at the very least, using wxCHECK and not wxASSERT in wxMSW code or, maybe, actually handling the degenerate cases there if all the other ports really support them. See #19172. --- interface/wx/dc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/interface/wx/dc.h b/interface/wx/dc.h index e5af4c2491..2f28a7b869 100644 --- a/interface/wx/dc.h +++ b/interface/wx/dc.h @@ -714,6 +714,8 @@ public: /** Draws a spline between all given points using the current pen. + The number of points must be at least 3 for the spline to be drawn. + @beginWxPerlOnly Not supported by wxPerl. @endWxPerlOnly