Hi All,
in my application i am having a panel with associated a wxWindowDC and wxMemoryDC. i have to draw the various thing on that panel like bg color, on top of bg color bg image and on the top bg image i have to draw some text etc.
I am storing all this thing into memory dc and finally in paint handler i m copying the memory dc to window dc.
But i stuck in this process when i want to draw transparency in color like wx.Color(0, 0, 0, 50) on my panel but this is not working because i am using the wxWindowDC to display data stored into MemoryDC. If i am using the wx.GCDC instead inside paint handler and then copy data on GCDC from MemoryDC its show Alpha in Color also.
Is the transparency in Color like can only work if We set brush and set pen as follow with the wxGCDC only? or this will also work with the MemoryDC also? So i can store every thing in memory dc and then just copy the data on windowdc/clientdc.
pdc = wx.PaintDC(self)
dc = wx.GCDC(pdc)
penclr = wx.Colour(120, 120, 120, wx.ALPHA_OPAQUE)
brushclr = wx.Colour(0, 0, 0, 70) # half transparent
dc.SetPen(wx.Pen(penclr))
dc.SetBrush(wx.Brush(brushclr))
dc.DrawRectangle(0, 0, 200, 400)
Any help really appreciable.