util/BitmapLibrary.py
branchwxPython4
changeset 3303 0ffb41625592
parent 1881 091005ec69c4
child 3750 f62625418bff
equal deleted inserted replaced
3302:c89fc366bebd 3303:0ffb41625592
    69             # Calculate bitmap size
    69             # Calculate bitmap size
    70             width = bmp1.GetWidth() + bmp2.GetWidth() - 1
    70             width = bmp1.GetWidth() + bmp2.GetWidth() - 1
    71             height = max(bmp1.GetHeight(), bmp2.GetHeight())
    71             height = max(bmp1.GetHeight(), bmp2.GetHeight())
    72 
    72 
    73             # Create bitmap with both icons
    73             # Create bitmap with both icons
    74             bmp = wx.EmptyBitmap(width, height)
    74             bmp = wx.Bitmap(width, height)
    75             dc = wx.MemoryDC()
    75             dc = wx.MemoryDC()
    76             dc.SelectObject(bmp)
    76             dc.SelectObject(bmp)
    77             dc.Clear()
    77             dc.Clear()
    78             dc.DrawBitmap(bmp1, 0, 0)
    78             dc.DrawBitmap(bmp1, 0, 0)
    79             dc.DrawBitmap(bmp2, bmp1.GetWidth() - 1, 0)
    79             dc.DrawBitmap(bmp2, bmp1.GetWidth() - 1, 0)