From 78120174d64999b91694e4363b2a81418e3fe231 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 2 Jul 2020 15:29:49 -0700 Subject: [PATCH] Copy the full documentation for our custom dc.GetPixel wrapper --- etg/dc.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/etg/dc.py b/etg/dc.py index 285f4621..94e3ab44 100644 --- a/etg/dc.py +++ b/etg/dc.py @@ -198,7 +198,17 @@ def run(): # compatibility. c.find('GetPixel').ignore() c.addCppMethod('wxColour*', 'GetPixel', '(wxCoord x, wxCoord y)', - doc="Gets the colour at the specified location on the DC.", + doc="""\ + Gets the colour at the specified location on the DC. + + This method isn't available for ``wx.PostScriptDC`` or ``wx.MetafileDC`` nor + for any DC in wxOSX port, and simply returns ``wx.NullColour`` there. + + .. note:: Setting a pixel can be done using DrawPoint(). + + .. note:: This method shouldn't be used with ``wx.PaintDC`` as accessing the + DC while drawing can result in unexpected results, notably in wxGTK. + """, body="""\ wxColour* col = new wxColour; self->GetPixel(x, y, col);