When displaying a picture I want to overlay (at the top left) some picture info. I want white text on a black background so that it is readable no matter what colours are in the picture. The code that paints the display is:
# Draw the image
dc = wx.AutoBufferedPaintDC(self)
dc.Clear()
dc.DrawBitmap(bitmap, sx, sy, True)
# Draw the text overlay
dc.SetTextForeground(wx.WHITE)
dc.SetTextBackground(wx.BLACK)
note = f'{self.files[self.index]} {self.index+1} of {len(self.files)}'
dc.DrawText(note, 5, 5)
What I actually get is white text on whatever the picture is. What am I doing wrong?