GRASS Programmer's Manual
6.4.2(2012)
|
A Buffered window class. More...
Public Member Functions | |
def | __init__ |
def | Draw |
Draws histogram or clears window. | |
def | OnPaint |
Draw psuedo DC to buffer. | |
def | OnSize |
Init image size to match window size. | |
def | OnIdle |
Only re-render a histogram image from GRASS during idle time instead of multiple times during resizing. | |
def | SaveToFile |
This will save the contents of the buffer to the specified file. | |
def | GetImage |
Converts files to wx.Image. | |
def | UpdateHist |
Update canvas if histogram options changes or window changes geometry. | |
def | EraseMap |
Erase the map display. |
Data Fields | |
parent | |
Map | |
mapname | |
render | |
resize | |
dragimg | |
pen | |
mapfile | |
img | |
imagedict | |
pdc |
A Buffered window class.
When the drawing needs to change, you app needs to call the UpdateHist() method. Since the drawing is stored in a bitmap, you can also save the drawing to file by calling the SaveToFile(self,file_name,file_type) method.
Definition at line 35 of file histogram.py.
def gui_modules.histogram.BufferedWindow.__init__ | ( | self, | |
parent, | |||
id = wx.ID_ANY , |
|||
style = wx.NO_FULL_REPAINT_ON_RESIZE , |
|||
Map = None , |
|||
kwargs | |||
) |
Definition at line 45 of file histogram.py.
def gui_modules.histogram.BufferedWindow.Draw | ( | self, | |
pdc, | |||
img = None , |
|||
drawid = None , |
|||
pdctype = 'image' , |
|||
coords = [0 |
|||
) |
Draws histogram or clears window.
Definition at line 85 of file histogram.py.
Referenced by gui_modules.mapdisp_window.BufferedWindow.DrawCross(), gui_modules.mapdisp_window.BufferedWindow.DrawLines(), gui_modules.histogram.BufferedWindow.EraseMap(), gui_modules.mapdisp_window.BufferedWindow.EraseMap(), gui_modules.mapdisp_window.BufferedWindow.MouseDraw(), gui_modules.nviz_tools.PositionWindow.OnMouse(), gui_modules.nviz_tools.PositionWindow.PostDraw(), gui_modules.histogram.BufferedWindow.SaveToFile(), gui_modules.mapdisp_window.BufferedWindow.SaveToFile(), gui_modules.wxnviz.Nviz.SaveToFile(), gui_modules.histogram.BufferedWindow.UpdateHist(), gui_modules.mapdisp_window.BufferedWindow.UpdateMap(), and gui_modules.psmap.PsMapBufferedWindow.Zoom().
def gui_modules.histogram.BufferedWindow.EraseMap | ( | self | ) |
Erase the map display.
Definition at line 256 of file histogram.py.
References gui_modules.histogram.BufferedWindow.Draw(), gui_modules.colorrules.BufferedWindow.Draw(), gui_modules.histogram.BufferedWindow.pdc, and gui_modules.colorrules.BufferedWindow.pdc.
def gui_modules.histogram.BufferedWindow.GetImage | ( | self | ) |
Converts files to wx.Image.
Definition at line 193 of file histogram.py.
References gui_modules.histogram.BufferedWindow.imagedict.
Referenced by gui_modules.histogram.BufferedWindow.OnSize(), gui_modules.histogram.BufferedWindow.SaveToFile(), gui_modules.mapdisp_window.BufferedWindow.SaveToFile(), gui_modules.histogram.BufferedWindow.UpdateHist(), and gui_modules.mapdisp_window.BufferedWindow.UpdateMap().
def gui_modules.histogram.BufferedWindow.OnIdle | ( | self, | |
event | |||
) |
Only re-render a histogram image from GRASS during idle time instead of multiple times during resizing.
Definition at line 162 of file histogram.py.
References gui_modules.histogram.BufferedWindow.render, gui_modules.colorrules.BufferedWindow.render, gui_modules.gcpmanager.GCPList.render, gui_modules.histogram.BufferedWindow.resize, gui_modules.colorrules.BufferedWindow.resize, and gui_modules.histogram.BufferedWindow.UpdateHist().
def gui_modules.histogram.BufferedWindow.OnPaint | ( | self, | |
event | |||
) |
Draw psuedo DC to buffer.
Definition at line 121 of file histogram.py.
References gui_modules.histogram.BufferedWindow._buffer.
Referenced by gui_modules.nviz_mapdisp.GLWindow.OnMouseAction().
def gui_modules.histogram.BufferedWindow.OnSize | ( | self, | |
event | |||
) |
Init image size to match window size.
Definition at line 139 of file histogram.py.
References gui_modules.histogram.BufferedWindow._buffer, gui_modules.histogram.BufferedWindow.GetImage(), gui_modules.colorrules.BufferedWindow.GetImage(), gui_modules.histogram.BufferedWindow.img, gui_modules.colorrules.BufferedWindow.img, gui_modules.histogram.BufferedWindow.render, gui_modules.colorrules.BufferedWindow.render, gui_modules.gcpmanager.GCPList.render, gui_modules.histogram.BufferedWindow.resize, gui_modules.colorrules.BufferedWindow.resize, and gui_modules.histogram.BufferedWindow.UpdateHist().
def gui_modules.histogram.BufferedWindow.SaveToFile | ( | self, | |
FileName, | |||
FileType, | |||
width, | |||
height | |||
) |
This will save the contents of the buffer to the specified file.
See the wx.Windows docs for wx.Bitmap::SaveFile for the details
Definition at line 171 of file histogram.py.
References gui_modules.histogram.BufferedWindow.Draw(), gui_modules.colorrules.BufferedWindow.Draw(), gui_modules.histogram.BufferedWindow.GetImage(), gui_modules.colorrules.BufferedWindow.GetImage(), max, gui_modules.histogram.BufferedWindow.pdc, and gui_modules.colorrules.BufferedWindow.pdc.
def gui_modules.histogram.BufferedWindow.UpdateHist | ( | self, | |
img = None |
|||
) |
Update canvas if histogram options changes or window changes geometry.
Definition at line 205 of file histogram.py.
References gui_modules.histogram.BufferedWindow.Draw(), gui_modules.colorrules.BufferedWindow.Draw(), gui_modules.histogram.BufferedWindow.GetImage(), gui_modules.colorrules.BufferedWindow.GetImage(), gui_modules.histogram.BufferedWindow.imagedict, gui_modules.histogram.BufferedWindow.img, gui_modules.colorrules.BufferedWindow.img, gui_modules.histogram.BufferedWindow.mapfile, gui_modules.colorrules.BufferedWindow.mapfile, gui_modules.histogram.BufferedWindow.pdc, gui_modules.colorrules.BufferedWindow.pdc, gui_modules.histogram.BufferedWindow.render, gui_modules.colorrules.BufferedWindow.render, gui_modules.gcpmanager.GCPList.render, gui_modules.histogram.BufferedWindow.resize, and gui_modules.colorrules.BufferedWindow.resize.
Referenced by gui_modules.histogram.BufferedWindow.OnIdle(), and gui_modules.histogram.BufferedWindow.OnSize().
gui_modules.histogram.BufferedWindow.dragimg |
Definition at line 58 of file histogram.py.
Referenced by gui_modules.mapdisp_window.BufferedWindow.DragMap().
gui_modules.histogram.BufferedWindow.imagedict |
Definition at line 74 of file histogram.py.
Referenced by gui_modules.mapdisp_window.BufferedWindow.Draw(), gui_modules.histogram.BufferedWindow.GetImage(), gui_modules.mapdisp_window.BufferedWindow.GetImage(), gui_modules.mapdisp_window.BufferedWindow.GetOverlay(), gui_modules.histogram.BufferedWindow.UpdateHist(), and gui_modules.mapdisp_window.BufferedWindow.UpdateMap().
gui_modules.histogram.BufferedWindow.img |
gui_modules.histogram.BufferedWindow.Map |
Definition at line 50 of file histogram.py.
Referenced by gui_modules.mapdisp.MapFrame.AddToolbar(), gui_modules.layertree.LayerTree.GetMap(), gui_modules.mapdisp.MapFrame.GetRender(), and gui_modules.mapdisp_window.BufferedWindow.OnMouseEnter().
gui_modules.histogram.BufferedWindow.mapfile |
Definition at line 71 of file histogram.py.
Referenced by gui_modules.render.Map.Clean(), gui_modules.mapdisp_window.BufferedWindow.GetImage(), gui_modules.render.Layer.Render(), gui_modules.render.Map.Render(), gui_modules.histogram.BufferedWindow.UpdateHist(), and gui_modules.mapdisp_window.BufferedWindow.UpdateMap().
gui_modules.histogram.BufferedWindow.mapname |
Definition at line 51 of file histogram.py.
Referenced by gui_modules.histogram.HistFrame.OnOptions(), and gui_modules.histogram.HistFrame.SetHistLayer().
gui_modules.histogram.BufferedWindow.parent |
Definition at line 49 of file histogram.py.
Referenced by gui_modules.wxvdigit.VDigitError.Database(), gui_modules.wxvdigit.VDigitError.DbExecute(), gui_modules.wxvdigit.VDigitError.DbLink(), gui_modules.wxvdigit.VDigitError.DeadLine(), gui_modules.wxvdigit.VDigitError.Driver(), gui_modules.wxvdigit.VDigitError.FeatureType(), gui_modules.wxvdigit.VDigitError.NoMap(), gui_modules.menuform.mainFrame.OnCancel(), gui_modules.menuform.mainFrame.OnDone(), wxgui.GMFrame.OnPsMap(), gui_modules.menuform.mainFrame.OnRun(), gui_modules.toolbars.VDigitToolbar.OnSelectMap(), gui_modules.toolbars.VDigitToolbar.OnSettings(), gui_modules.toolbars.NvizToolbar.OnSettings(), gui_modules.toolbars.AbstractToolbar.OnTool(), gui_modules.menuform.cmdPanel.OnUpdateSelection(), gui_modules.toolbars.VDigitToolbar.OnZBulk(), gui_modules.wxvdigit.VDigitError.ReadLine(), gui_modules.menuform.UpdateQThread.run(), gui_modules.toolbars.VDigitToolbar.StopEditing(), gui_modules.mapdisp_window.BufferedWindow.UpdateMap(), and gui_modules.wxvdigit.VDigitError.WriteLine().
gui_modules.histogram.BufferedWindow.pdc |
Definition at line 76 of file histogram.py.
Referenced by gui_modules.histogram.BufferedWindow.EraseMap(), gui_modules.mapdisp_window.BufferedWindow.EraseMap(), gui_modules.histogram.BufferedWindow.SaveToFile(), gui_modules.mapdisp_window.BufferedWindow.SaveToFile(), gui_modules.histogram.BufferedWindow.UpdateHist(), and gui_modules.mapdisp_window.BufferedWindow.UpdateMap().
gui_modules.histogram.BufferedWindow.pen |
Definition at line 59 of file histogram.py.
Referenced by gui_modules.mapdisp_window.BufferedWindow.Draw(), gui_modules.mapdisp_vdigit.VDigitWindow.OnLeftDownUndo(), and gui_modules.psmap.PsMapBufferedWindow.Zoom().
gui_modules.histogram.BufferedWindow.render |
Definition at line 56 of file histogram.py.
Referenced by gui_modules.histogram.BufferedWindow.OnIdle(), gui_modules.histogram.BufferedWindow.OnSize(), and gui_modules.histogram.BufferedWindow.UpdateHist().
gui_modules.histogram.BufferedWindow.resize |
Definition at line 57 of file histogram.py.
Referenced by gui_modules.histogram.BufferedWindow.OnIdle(), gui_modules.mapdisp_window.BufferedWindow.OnIdle(), gui_modules.histogram.BufferedWindow.OnSize(), gui_modules.histogram.BufferedWindow.UpdateHist(), and gui_modules.mapdisp_window.BufferedWindow.UpdateMap().