def _convert_agg_to_wx_image(agg, bbox):
 if (bbox is None):
  image = wxc.EmptyImage(int(agg.width), int(agg.height))
  image.SetData(agg.tostring_rgb())
  return image
 else:
  return wx.ImageFromBitmap(_WX28_clipped_agg_as_bitmap(agg, bbox))

def _convert_agg_to_wx_image ( agg , bbox ) : if ( bbox is None ) : image = wxc . EmptyImage ( int ( agg . width ) , int ( agg . height ) ) image . SetData ( agg . tostring_rgb ( ) ) return image else : return wx . ImageFromBitmap ( _WX28_clipped_agg_as_bitmap ( agg , bbox ) )
convert the region of the agg buffer bounded by bbox to a wx .