diplomat.wx_gui.icons.to_wx_bitmap

diplomat.wx_gui.icons.to_wx_bitmap(icon_bytes: bytes, icon_size: Tuple[int, int], fg_color: wx.Colour, bitmap_size: Tuple[int, int] = None) wx.Bitmap[source]

Converts an icon in this module into a wx.Bitmap for rendering in wxWidget’s UIs.

Parameters:
  • icon_bytes – The bytes of the icon provided by this module.

  • icon_size – The size of the icon, also provided by this module.

  • fg_color – A wx.Colour. This is the foreground color that will be used when rendering the icon.

  • bitmap_size – A optional tuple of integers which defines the size of the returned bitmap. Defaults to the size of the original icon.