Hi, I am trying to change the font weight when drawing in a bitmap in GCDC in wxpython. Everything seems to work fine and I can get the text in my image, however I cannot change some of the font settings. The size can be changed without problems, but for example the FONTWEIGHT cannot be changed and I always get the default value (NORMAL instead of LIGHT).
Please find a code sample attached.
I have tested the same piece of code using “wx.MemoryDC(bmp)” alone instead of “wx.GCDC(wx.MemoryDC(bmp))” and changing the font settings works properly. However I cannot use it because I am “painting” on top of a transparent image and I get a different issue with “MemoryDC” alone: the letters are transparent in that case.
Is this a bug in the GCDC class?
Do we have a method available to draw text on top of transparent images where fonts can be properly changed?
Any idea how to solve this??
Thanks in advance!
Regards,
Jose Antonio.
codeSample.txt (361 Bytes)