dc.DrawPoint() not producing the pen's colour

I have been experimenting with dc.DrawPoint() and dc.DrawPointList() but the pixels produced by both methods are not the exact colour as that set in the Pen object.

When I run the example code below, it draws 2 squares on a panel, both using wx.BLACK. The square on the left is drawn using dc.DrawPoint() and the square on the right is drawn using dc.DrawRectangle(). The square on the left is noticeably lighter that the square on the right. The Gpick tool gives ‘#3F3F3F’ for the left square, but the expected ‘#000000’ for the square on the right. In my real application I need to be able to draw scattered individual points, so using DrawRectangle() is not appropriate.

Is there a way to get DrawPoint() to produce pixels in the exact colour set in the pen?

I am using Python 3.6.9 and wxPython 4.0.1 gtk3 on Linux Mint 19.3 on my development PC.
I have tested the code on another PC that has Python 3.8.2 and wxPython 4.0.7 gtk3 on Linux Mint 20 and it gave identical results.

import wx

class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((275, 175))
        self.panel_1 = wx.Panel(self, wx.ID_ANY)
        self.close_button = wx.Button(self, wx.ID_ANY, "Close")

        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_1.Add(self.panel_1, 1, wx.EXPAND, 0)
        sizer_2.Add((20, 20), 1, wx.EXPAND, 0)
        sizer_2.Add(self.close_button, 0, 0, 0)
        sizer_2.Add((20, 20), 1, wx.EXPAND, 0)
        sizer_1.Add(sizer_2, 0, wx.BOTTOM | wx.EXPAND | wx.TOP, 8)

        self.Bind(wx.EVT_BUTTON, self.OnClose, self.close_button)
        self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
        self.Bind(wx.EVT_PAINT, self.OnPaint)

    def Draw(self, dc):
        bg_brush = wx.Brush(wx.WHITE, wx.BRUSHSTYLE_SOLID)

        pen = wx.Pen(wx.BLACK)
        brush = wx.Brush(wx.BLACK)

        for y in range(100):
            for x in range(100):
                dc.DrawPoint(x, y)

        dc.DrawRectangle(120, 0, 100, 100)

    def OnClose(self, _event):

    def OnEraseBackground(self, event):

    def OnPaint(self, _event):
        dc = wx.BufferedPaintDC(self)

class MyApp(wx.App):
    def OnInit(self):
        self.frame = MyFrame(None, wx.ID_ANY, "")
        return True

if __name__ == "__main__":
    app = MyApp(0)

It’s working as expected on other platforms, so it seems to be GTK3 specific. You’ll need to ask on the wx-users or wx-dev mail list, and/or create a ticket about it, if one does not already exist, at https://trac.wxwidgets.org/