diplomat.wx_gui.icons.svg_to_wx_bitmap

diplomat.wx_gui.icons.svg_to_wx_bitmap(svg_bytes: bytes, desired_size: Tuple[int, int] = None, window_hint: wx.Window = None) wx.Bitmap[source]

Converts a svg based icon in this module to a wx.Bitmap for rendering in wxWidget UIs.

Parameters:
  • svg_bytes – SVG bytes for svg icon provided by this module.

  • desired_size – The size of the returned bitmap. If none, uses the default size provided by the svg.

  • window_hint – Optional wx widget to use for rescaling bitmap to handle hidpi scenarios.