def _py_convert_agg_to_wx_bitmap(agg, bbox):
if bbox is None:<EOL><INDENT>return wx.BitmapFromImage(_py_convert_agg_to_wx_image(agg, None))<EOL><DEDENT>else:<EOL><INDENT>return _clipped_image_as_bitmap(<EOL>_py_convert_agg_to_wx_image(agg, None),<EOL>bbox)<EOL><DEDENT>
Convert the region of the agg buffer bounded by bbox to a wx.Bitmap.  If
bbox is None, the entire buffer is converted.

Note: agg must be a backend_agg.RendererAgg instance.