equal
deleted
inserted
replaced
27 |
27 |
28 from collections import OrderedDict |
28 from collections import OrderedDict |
29 from functools import reduce |
29 from functools import reduce |
30 |
30 |
31 import wx |
31 import wx |
32 from matplotlib.backends.backend_wxagg import _convert_agg_to_wx_bitmap |
|
33 |
32 |
34 from dialogs.ForceVariableDialog import ForceVariableDialog |
33 from dialogs.ForceVariableDialog import ForceVariableDialog |
35 |
34 |
36 # Viewer highlight types |
35 # Viewer highlight types |
37 [HIGHLIGHT_NONE, |
36 [HIGHLIGHT_NONE, |
301 srcBBox = srcPanel.GetAxesBoundingBox() |
300 srcBBox = srcPanel.GetAxesBoundingBox() |
302 |
301 |
303 srcX = srcBBox.x - (srcPos.x if destBBox.x == 0 else 0) |
302 srcX = srcBBox.x - (srcPos.x if destBBox.x == 0 else 0) |
304 srcY = srcBBox.y - (srcPos.y if destBBox.y == 0 else 0) |
303 srcY = srcBBox.y - (srcPos.y if destBBox.y == 0 else 0) |
305 |
304 |
306 srcBmp = _convert_agg_to_wx_bitmap( |
305 agg_bitmap = srcPanel.get_renderer() |
307 srcPanel.get_renderer(), None) |
306 srcBmp = wx.Bitmap.FromBufferRGBA(int(agg_bitmap.width), int(agg_bitmap.height), |
|
307 agg_bitmap.buffer_rgba()) |
|
308 |
308 srcDC = wx.MemoryDC() |
309 srcDC = wx.MemoryDC() |
309 srcDC.SelectObject(srcBmp) |
310 srcDC.SelectObject(srcBmp) |
310 |
311 |
311 dc.Blit(destBBox.x, destBBox.y, |
312 dc.Blit(destBBox.x, destBBox.y, |
312 int(destBBox.width), int(destBBox.height), |
313 int(destBBox.width), int(destBBox.height), |