mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 20:40:11 +01:00
Merge pull request #1710 from wxWidgets/fix-issue1701
Copy the full documentation for our custom dc.GetPixel wrapper
This commit is contained in:
12
etg/dc.py
12
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);
|
||||
|
||||
Reference in New Issue
Block a user