|
GRASS Programmer's Manual
6.5.svn(2012)-r51648
|
A Buffered window class (2D view mode) More...


Public Member Functions | |
| def | __init__ |
| def | Draw |
| Draws map and overlay decorations. | |
| def | TextBounds |
| Return text boundary data. | |
| def | OnPaint |
| Draw PseudoDC's to buffered paint DC. | |
| def | OnSize |
| Scale map image so that it is the same size as the Window. | |
| def | OnIdle |
| Only re-render a composite map image from GRASS during idle time instead of multiple times during resizing. | |
| def | SaveToFile |
| This draws the pseudo DC to a buffer that can be saved to a file. | |
| def | GetOverlay |
| Converts rendered overlay files to wx.Image. | |
| def | GetImage |
| Converts redered map files to wx.Image. | |
| def | UpdateMap |
| Updates the canvas anytime there is a change to the underlaying images or to the geometry of the canvas. | |
| def | DrawCompRegionExtent |
| Draw computational region extent in the display. | |
| def | IsInRegion |
| Test if 'region' is inside of 'refRegion'. | |
| def | EraseMap |
| Erase map canvas. | |
| def | DragMap |
| Drag the entire map image for panning. | |
| def | DragItem |
| Drag an overlay decoration item. | |
| def | MouseDraw |
| Mouse box or line from 'begin' to 'end'. | |
| def | DrawLines |
| Draw polyline in PseudoDC. | |
| def | DrawCross |
| Draw cross in PseudoDC. | |
| def | MouseActions |
| Mouse motion and button click notifier. | |
| def | OnMouseWheel |
| Mouse wheel moved. | |
| def | OnDragging |
| Mouse dragging. | |
| def | OnLeftDown |
| Left mouse button pressed. | |
| def | OnLeftUp |
| Left mouse button released. | |
| def | OnButtonDClick |
| Mouse button double click. | |
| def | OnRightDown |
| Right mouse button pressed. | |
| def | OnRightUp |
| Right mouse button released. | |
| def | OnMiddleDown |
| Middle mouse button pressed. | |
| def | OnMiddleUp |
| Middle mouse button released. | |
| def | OnMouseEnter |
| Mouse entered window and no mouse buttons were pressed. | |
| def | OnMouseMoving |
| Motion event and no mouse buttons were pressed. | |
| def | ClearLines |
| Clears temporary drawn lines from PseudoDC. | |
| def | Pixel2Cell |
| Convert image coordinates to real word coordinates. | |
| def | Cell2Pixel |
| Convert real word coordinates to image coordinates. | |
| def | ResizeLegend |
| def | Zoom |
| Calculates new region while (un)zoom/pan-ing. | |
| def | ZoomBack |
| Zoom to previous extents in zoomhistory list. | |
| def | ZoomHistory |
| Manages a list of last 10 zoom extents. | |
| def | ResetZoomHistory |
| Reset zoom history. | |
| def | ZoomToMap |
| Set display extents to match selected raster or vector map(s). | |
| def | ZoomToWind |
| Set display geometry to match computational region settings (set with g.region) | |
| def | ZoomToDefault |
| Set display geometry to match default region settings. | |
| def | GoTo |
| def | DisplayToWind |
| Set computational region (WIND file) to match display extents. | |
| def | ZoomToSaved |
| Set display geometry to match extents in saved region file. | |
| def | SaveDisplayRegion |
| Save display extents to named region file. | |
| def | SaveRegion |
| Save region settings. | |
| def | Distance |
| Calculete distance. | |
Data Fields | |
| resize | |
| dragimg | |
| pen | |
| polypen | |
| polycoords | |
| lineid | |
| plineid | |
| processMouse | |
| mapfile | |
| img | |
| overlays | |
| imagedict | |
| select | |
| textdict | |
| currtxtid | |
| zoomhistory | |
| currzoom | |
| zoomtype | |
| hitradius | |
| dialogOffset | |
| redrawAll | |
| self.OnSize(None) | |
| dragid | |
| lastpos | |
| pdc | |
| pdcVector | |
| pdcDec | |
| pdcTmp | |
| bufferLast | |
| buffer | |
| self.Map.AlignExtentFromDisplay() | |
| regionCoords | |
| idlist | |
A Buffered window class (2D view mode)
Superclass for VDigitWindow (vector digitizer).
When the drawing needs to change, you app needs to call the UpdateMap() method. Since the drawing is stored in a bitmap, you can also save the drawing to file by calling the SaveToFile() method.
Definition at line 39 of file mapdisp/mapwindow.py.
| def mapwindow.BufferedWindow.__init__ | ( | self, | |
| parent, | |||
id = wx.ID_ANY, |
|||
Map = None, |
|||
tree = None, |
|||
lmgr = None, |
|||
style = wx.NO_FULL_REPAINT_ON_RESIZE, |
|||
| kwargs | |||
| ) |
Reimplemented in mapwindow.VDigitWindow.
Definition at line 51 of file mapdisp/mapwindow.py.
| def mapwindow.BufferedWindow.Cell2Pixel | ( | self, | |
| east, | |||
| north | |||
| ) |
Convert real word coordinates to image coordinates.
Reimplemented from mapwindow.MapWindow.
Definition at line 1321 of file mapdisp/mapwindow.py.
| def mapwindow.BufferedWindow.ClearLines | ( | self, | |
pdc = None |
|||
| ) |
Clears temporary drawn lines from PseudoDC.
Definition at line 1272 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.lineid, mapwindow.BufferedWindow.pdcTmp, and mapwindow.BufferedWindow.plineid.
Referenced by mapwindow.BufferedWindow.OnButtonDClick(), mapwindow.BufferedWindow.OnLeftDown(), mapwindow.BufferedWindow.OnLeftUp(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), and mapwindow.BufferedWindow.UpdateMap().
| def mapwindow.BufferedWindow.DisplayToWind | ( | self | ) |
Set computational region (WIND file) to match display extents.
Definition at line 1592 of file mapdisp/mapwindow.py.
References gcmd.RunCommand().
| def mapwindow.BufferedWindow.Distance | ( | self, | |
| beginpt, | |||
| endpt, | |||
screen = True |
|||
| ) |
Calculete distance.
Ctypes required for LL-locations
| beginpt | first point |
| endpt | second point |
| screen | True for screen coordinates otherwise EN |
Definition at line 1697 of file mapdisp/mapwindow.py.
References mapwindow.MapWindow.Pixel2Cell().
Referenced by mapwindow.VDigitWindow.SetToolbar().
| def mapwindow.BufferedWindow.DragItem | ( | self, | |
| id, | |||
| event | |||
| ) |
Drag an overlay decoration item.
Definition at line 737 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.lastpos, mapwindow.BufferedWindow.textdict, and dialogs.type.
Referenced by mapwindow.GLWindow.OnDragging(), and mapwindow.BufferedWindow.OnDragging().
| def mapwindow.BufferedWindow.DragMap | ( | self, | |
| moveto | |||
| ) |
Drag the entire map image for panning.
| moveto | dx,dy |
Definition at line 720 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.buffer, and mapwindow.BufferedWindow.dragimg.
Referenced by mapwindow.BufferedWindow.OnDragging().
| def mapwindow.BufferedWindow.Draw | ( | self, | |
| pdc, | |||
img = None, |
|||
drawid = None, |
|||
pdctype = 'image', |
|||
coords = [0 |
|||
| ) |
Draws map and overlay decorations.
Definition at line 129 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.imagedict, max, min, mapwindow.BufferedWindow.pen, mapwindow.BufferedWindow.polypen, mapwindow.BufferedWindow.select, and mapwindow.BufferedWindow.TextBounds().
Referenced by mapwindow.BufferedWindow.DrawCross(), frame.PsMapBufferedWindow.DrawGraphics(), mapwindow.BufferedWindow.DrawLines(), histogram.BufferedWindow.EraseMap(), mapwindow.BufferedWindow.EraseMap(), colorrules.BufferedWindow.EraseMap(), mapwindow.BufferedWindow.MouseDraw(), frame.PsMapBufferedWindow.OnDragging(), frame.PsMapBufferedWindow.OnLeftUp(), tools.PositionWindow.OnMouse(), tools.PositionWindow.PostDraw(), tools.LightPositionWindow.PostDraw(), histogram.BufferedWindow.SaveToFile(), mapwindow.BufferedWindow.SaveToFile(), wxnviz.Nviz.SaveToFile(), histogram.BufferedWindow.UpdateHist(), mapwindow.BufferedWindow.UpdateMap(), colorrules.BufferedWindow.UpdatePreview(), and frame.PsMapBufferedWindow.Zoom().
| def mapwindow.BufferedWindow.DrawCompRegionExtent | ( | self | ) |
Draw computational region extent in the display.
Display region is drawn as a blue box inside the computational region, computational region inside a display region as a red box).
Definition at line 664 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.IsInRegion(), and mapwindow.BufferedWindow.polypen.
Referenced by mapwindow.BufferedWindow.UpdateMap().
| def mapwindow.BufferedWindow.DrawCross | ( | self, | |
| pdc, | |||
| coords, | |||
| size, | |||
rotation = 0, |
|||
text = None, |
|||
textAlign = 'lr', |
|||
textOffset = (5, 5 |
|||
| ) |
Draw cross in PseudoDC.
| pdc | PseudoDC |
| coord | center coordinates |
| rotation | rotate symbol |
| text | draw also text (text, font, color, rotation) |
| textAlign | alignment (default 'lower-right') offset for text (from center point) |
Definition at line 850 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.Draw(), and mapwindow.BufferedWindow.lineid.
Referenced by mapwindow.BufferedWindow.DrawLines(), and mapwindow.VDigitWindow.OnLeftUpModifyLine().
| def mapwindow.BufferedWindow.DrawLines | ( | self, | |
pdc = None, |
|||
polycoords = None |
|||
| ) |
Draw polyline in PseudoDC.
Set self.pline to wx.NEW_ID + 1
polycoords - list of polyline vertices, geographical coordinates (if not given, self.polycoords is used)
Definition at line 819 of file mapdisp/mapwindow.py.
References mapwindow.MapWindow.Cell2Pixel(), mapwindow.BufferedWindow.Draw(), mapwindow.BufferedWindow.DrawCross(), mapwindow.BufferedWindow.pdcTmp, mapwindow.BufferedWindow.plineid, and mapwindow.BufferedWindow.polycoords.
Referenced by mapwindow.VDigitWindow.OnLeftDownAddLine(), mapwindow.VDigitWindow.OnLeftDownEditLine(), mapwindow.BufferedWindow.OnLeftUp(), mapwindow.VDigitWindow.OnLeftUpBulkLine(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), and mapwindow.BufferedWindow.UpdateMap().
| def mapwindow.BufferedWindow.EraseMap | ( | self | ) |
Erase map canvas.
Definition at line 709 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.Draw(), mapwindow.BufferedWindow.pdc, mapwindow.BufferedWindow.pdcDec, mapwindow.BufferedWindow.pdcTmp, and mapwindow.BufferedWindow.pdcVector.
| def mapwindow.BufferedWindow.GetImage | ( | self | ) |
Converts redered map files to wx.Image.
Updates self.imagedict (id=99)
Definition at line 504 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.imagedict, mapwindow.BufferedWindow.mapfile, render.Layer.mapfile, and render.Map.mapfile.
Referenced by histogram.BufferedWindow.OnSize(), colorrules.BufferedWindow.OnSize(), histogram.BufferedWindow.SaveToFile(), mapwindow.BufferedWindow.SaveToFile(), histogram.BufferedWindow.UpdateHist(), mapwindow.BufferedWindow.UpdateMap(), and colorrules.BufferedWindow.UpdatePreview().
| def mapwindow.BufferedWindow.GetOverlay | ( | self | ) |
Converts rendered overlay files to wx.Image.
Updates self.imagedict
Definition at line 487 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.imagedict.
Referenced by mapwindow.BufferedWindow.SaveToFile(), and mapwindow.BufferedWindow.UpdateMap().
| def mapwindow.BufferedWindow.GoTo | ( | self, | |
| e, | |||
| n | |||
| ) |
Definition at line 1573 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.ZoomHistory().
| def mapwindow.BufferedWindow.IsInRegion | ( | self, | |
| region, | |||
| refRegion | |||
| ) |
Test if 'region' is inside of 'refRegion'.
| region | input region |
| refRegion | reference region (e.g. computational region) |
Definition at line 691 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DrawCompRegionExtent().
| def mapwindow.BufferedWindow.MouseActions | ( | self, | |
| event | |||
| ) |
Mouse motion and button click notifier.
Definition at line 888 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.OnButtonDClick(), mapwindow.BufferedWindow.OnDragging(), widgets.SingleSymbolPanel.OnLeftDown(), gselect.TreeCtrlComboPopup.OnLeftDown(), mapwindow.BufferedWindow.OnLeftDown(), dialogs.LayersList.OnLeftDown(), mapwindow.BufferedWindow.OnLeftUp(), mapwindow.BufferedWindow.OnMiddleDown(), mapwindow.BufferedWindow.OnMiddleUp(), mapwindow.BufferedWindow.OnMouseEnter(), mapwindow.BufferedWindow.OnMouseMoving(), mapwindow.BufferedWindow.OnMouseWheel(), mapwindow.BufferedWindow.OnRightDown(), dialogs.VariableListCtrl.OnRightUp(), dialogs.ItemListCtrl.OnRightUp(), mapwindow.BufferedWindow.OnRightUp(), and mapwindow.BufferedWindow.processMouse.
| def mapwindow.BufferedWindow.MouseDraw | ( | self, | |
pdc = None, |
|||
begin = None, |
|||
end = None |
|||
| ) |
Mouse box or line from 'begin' to 'end'.
If not given from self.mouse['begin'] to self.mouse['end'].
Definition at line 768 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.Draw(), mapwindow.BufferedWindow.lineid, max, min, mapwindow.MapWindow.mouse, and dialogs.type.
Referenced by mapwindow.BufferedWindow.OnDragging(), and mapwindow.VDigitWindow.OnLeftUpConnectLine().
| def mapwindow.BufferedWindow.OnButtonDClick | ( | self, | |
| event | |||
| ) |
Mouse button double click.
Definition at line 1164 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.ClearLines(), mapwindow.BufferedWindow.currtxtid, mapwindow.BufferedWindow.dragid, mapwindow.BufferedWindow.hitradius, mapwindow.MapWindow.mouse, mapwindow.BufferedWindow.pdcTmp, and mapwindow.BufferedWindow.polycoords.
Referenced by mapwindow.BufferedWindow.MouseActions(), and frame.PsMapBufferedWindow.MouseActions().
| def mapwindow.BufferedWindow.OnDragging | ( | self, | |
| event | |||
| ) |
Mouse dragging.
Definition at line 977 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.dragid, mapwindow.BufferedWindow.DragItem(), mapwindow.BufferedWindow.DragMap(), mapwindow.MapWindow.mouse, mapwindow.BufferedWindow.MouseDraw(), mapwindow.BufferedWindow.pdcTmp, mapwindow.VDigitWindow.toolbar, profile.ProfileFrame.toolbar, frame.PsMapFrame.toolbar, frame.ModelFrame.toolbar, wxdigit.IVDigit.toolbar, and histogram.HistogramFrame.toolbar.
Referenced by mapwindow.BufferedWindow.MouseActions(), frame.PsMapBufferedWindow.MouseActions(), and mapwindow.GLWindow.OnMouseAction().
| def mapwindow.BufferedWindow.OnIdle | ( | self, | |
| event | |||
| ) |
Only re-render a composite map image from GRASS during idle time instead of multiple times during resizing.
Definition at line 420 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.resize, and mapwindow.BufferedWindow.UpdateMap().
| def mapwindow.BufferedWindow.OnLeftDown | ( | self, | |
| event | |||
| ) |
Left mouse button pressed.
Definition at line 1015 of file mapdisp/mapwindow.py.
References mapwindow.VDigitWindow._onLeftDown(), mapwindow.BufferedWindow.ClearLines(), mapwindow.MapWindow.mouse, mapwindow.VDigitWindow.OnLeftDownUndo(), mapwindow.BufferedWindow.pdcTmp, mapwindow.MapWindow.Pixel2Cell(), and mapwindow.BufferedWindow.polycoords.
Referenced by mapwindow.BufferedWindow.MouseActions(), frame.PsMapBufferedWindow.MouseActions(), and mapwindow.GLWindow.OnMouseAction().
| def mapwindow.BufferedWindow.OnLeftUp | ( | self, | |
| event | |||
| ) |
Left mouse button released.
Definition at line 1059 of file mapdisp/mapwindow.py.
References mapwindow.VDigitWindow._onLeftUp(), mapwindow.BufferedWindow.ClearLines(), mapwindow.BufferedWindow.currtxtid, mapwindow.BufferedWindow.dragid, mapwindow.BufferedWindow.DrawLines(), mapwindow.MapWindow.GetSelectedLayer(), mapwindow.MapWindow.mouse, mapwindow.BufferedWindow.overlays, render.Map.overlays, mapwindow.BufferedWindow.pdcTmp, mapwindow.MapWindow.Pixel2Cell(), mapwindow.BufferedWindow.ResizeLegend(), widgets.SetValue(), mapwindow.BufferedWindow.textdict, mapwindow.BufferedWindow.UpdateMap(), mapwindow.BufferedWindow.Zoom(), and mapwindow.BufferedWindow.zoomtype.
Referenced by mapwindow.BufferedWindow.MouseActions(), frame.PsMapBufferedWindow.MouseActions(), and mapwindow.GLWindow.OnMouseAction().
| def mapwindow.BufferedWindow.OnMiddleDown | ( | self, | |
| event | |||
| ) |
Middle mouse button pressed.
Definition at line 1224 of file mapdisp/mapwindow.py.
References mapwindow.MapWindow.mouse.
Referenced by mapwindow.BufferedWindow.MouseActions(), and frame.PsMapBufferedWindow.MouseActions().
| def mapwindow.BufferedWindow.OnMiddleUp | ( | self, | |
| event | |||
| ) |
Middle mouse button released.
Definition at line 1232 of file mapdisp/mapwindow.py.
References mapwindow.MapWindow.mouse, mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.Zoom().
Referenced by mapwindow.BufferedWindow.MouseActions().
| def mapwindow.BufferedWindow.OnMouseEnter | ( | self, | |
| event | |||
| ) |
Mouse entered window and no mouse buttons were pressed.
Definition at line 1249 of file mapdisp/mapwindow.py.
References mapwindow.MapWindow.Map, mapdisp.MapFrameBase.Map, mapdisplay.MapFrame.Map, manager.GCPWizard.Map, manager.GCP.Map, and wxnviz.Nviz.SetFocus().
Referenced by mapwindow.BufferedWindow.MouseActions().
| def mapwindow.BufferedWindow.OnMouseMoving | ( | self, | |
| event | |||
| ) |
Motion event and no mouse buttons were pressed.
Definition at line 1263 of file mapdisp/mapwindow.py.
References mapwindow.VDigitWindow._onMouseMoving(), and mapwindow.MapWindow.mouse.
Referenced by mapwindow.BufferedWindow.MouseActions(), and frame.PsMapBufferedWindow.MouseActions().
| def mapwindow.BufferedWindow.OnMouseWheel | ( | self, | |
| event | |||
| ) |
Mouse wheel moved.
Definition at line 936 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.processMouse, mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.Zoom().
Referenced by mapwindow.BufferedWindow.MouseActions(), frame.PsMapBufferedWindow.MouseActions(), and mapwindow.GLWindow.OnMouseAction().
| def mapwindow.BufferedWindow.OnPaint | ( | self, | |
| event | |||
| ) |
Draw PseudoDC's to buffered paint DC.
If self.redrawAll is False on self.pdcTmp content is re-drawn
Definition at line 312 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.buffer, and mapwindow.BufferedWindow.redrawAll.
| def mapwindow.BufferedWindow.OnRightDown | ( | self, | |
| event | |||
| ) |
Right mouse button pressed.
Definition at line 1199 of file mapdisp/mapwindow.py.
References mapwindow.VDigitWindow._onRightDown(), and mapwindow.MapWindow.mouse.
Referenced by mapwindow.BufferedWindow.MouseActions().
| def mapwindow.BufferedWindow.OnRightUp | ( | self, | |
| event | |||
| ) |
Right mouse button released.
Definition at line 1210 of file mapdisp/mapwindow.py.
References mapwindow.VDigitWindow._onRightUp(), mapwindow.MapWindow.mouse, and mapwindow.BufferedWindow.redrawAll.
Referenced by mapwindow.BufferedWindow.MouseActions().
| def mapwindow.BufferedWindow.OnSize | ( | self, | |
| event | |||
| ) |
Scale map image so that it is the same size as the Window.
Definition at line 386 of file mapdisp/mapwindow.py.
| def mapwindow.BufferedWindow.Pixel2Cell | ( | self, | |
| x, | |||
| y | |||
| ) |
Convert image coordinates to real word coordinates.
| x,y | image coordinates |
Reimplemented from mapwindow.MapWindow.
Definition at line 1294 of file mapdisp/mapwindow.py.
| def mapwindow.BufferedWindow.ResetZoomHistory | ( | self | ) |
Reset zoom history.
Definition at line 1493 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.zoomhistory.
| def mapwindow.BufferedWindow.ResizeLegend | ( | self, | |
| begin, | |||
| end | |||
| ) |
Definition at line 1343 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.overlays, and render.Map.overlays.
Referenced by mapwindow.BufferedWindow.OnLeftUp().
| def mapwindow.BufferedWindow.SaveDisplayRegion | ( | self | ) |
Save display extents to named region file.
Definition at line 1647 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.SaveRegion().
| def mapwindow.BufferedWindow.SaveRegion | ( | self, | |
| wind | |||
| ) |
Save region settings.
| wind | region name |
Definition at line 1671 of file mapdisp/mapwindow.py.
References gcmd.RunCommand().
Referenced by mapwindow.BufferedWindow.SaveDisplayRegion().
| def mapwindow.BufferedWindow.SaveToFile | ( | self, | |
| FileName, | |||
| FileType, | |||
| width, | |||
| height | |||
| ) |
This draws the pseudo DC to a buffer that can be saved to a file.
| FileName | file name |
| FileType | type of bitmap |
| width | image width |
| height | image height |
Definition at line 429 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.Draw(), mapwindow.BufferedWindow.GetImage(), mapwindow.BufferedWindow.GetOverlay(), render.Map.GetOverlay(), mapwindow.BufferedWindow.imagedict, max, mapwindow.BufferedWindow.overlays, render.Map.overlays, mapwindow.BufferedWindow.pdc, mapwindow.BufferedWindow.pdcVector, mapwindow.BufferedWindow.textdict, and mapwindow.BufferedWindow.UpdateMap().
| def mapwindow.BufferedWindow.TextBounds | ( | self, | |
| textinfo, | |||
relcoords = False |
|||
| ) |
Return text boundary data.
| textinfo | text metadata (text, font, color, rotation) |
| coords | reference point |
Definition at line 258 of file mapdisp/mapwindow.py.
References animation.Animation.Update(), manager.VirtualAttributeList.Update(), statusbar.SbManager.Update(), forms.UpdateQThread.Update(), profile.ProfileFrame.Update(), statusbar.SbItem.Update(), statusbar.SbRender.Update(), statusbar.SbMapScale.Update(), statusbar.SbGoTo.Update(), model.Model.Update(), statusbar.SbProjection.Update(), statusbar.SbMask.Update(), statusbar.SbTextItem.Update(), model.ModelObject.Update(), statusbar.SbGoToGCP.Update(), model.ModelAction.Update(), model.ModelData.Update(), frame.VariablePanel.Update(), model.ModelLoop.Update(), frame.ItemPanel.Update(), manager.TableListCtrl.Update(), and manager.LayerListCtrl.Update().
Referenced by mapwindow.GLWindow.CreateTexture(), and mapwindow.BufferedWindow.Draw().
| def mapwindow.BufferedWindow.UpdateMap | ( | self, | |
render = True, |
|||
renderVector = True |
|||
| ) |
Updates the canvas anytime there is a change to the underlaying images or to the geometry of the canvas.
| render | re-render map composition |
| renderVector | re-render vector map layer enabled for editing (used for digitizer) |
Definition at line 522 of file mapdisp/mapwindow.py.
References mapwindow.VDigitWindow._updateMap(), mapwindow.BufferedWindow.ClearLines(), mapwindow.BufferedWindow.Draw(), mapwindow.BufferedWindow.DrawCompRegionExtent(), mapwindow.BufferedWindow.DrawLines(), mapwindow.BufferedWindow.GetImage(), mapwindow.BufferedWindow.GetOverlay(), render.Map.GetOverlay(), mapwindow.BufferedWindow.imagedict, mapwindow.BufferedWindow.img, dialogs.RegionDef.img, mapwindow.BufferedWindow.mapfile, render.Layer.mapfile, render.Map.mapfile, mapwindow.MapWindow.mouse, mapwindow.BufferedWindow.overlays, render.Map.overlays, mapwindow.MapWindow.parent, sqlbuilder.SQLFrame.parent, mapdisp.MapFrameBase.parent, dialogs.ModelDataDialog.parent, dialogs.DisplayAttributesDialog.parent, manager.Log.parent, frame.ModelFrame.parent, goutput.CmdThread.parent, manager.VirtualAttributeList.parent, manager.GCPWizard.parent, dialogs.ModelSearchDialog.parent, forms.UpdateThread.parent, ghelp.MenuTreeWindow.parent, goutput.GMConsole.parent, dialogs.ModelRelationDialog.parent, manager.LocationPage.parent, forms.UpdateQThread.parent, ghelp.MenuTree.parent, forms.TaskFrame.parent, dialogs.ModelItemDialog.parent, manager.GroupPage.parent, dialogs.DecorationDialog.parent, manager.AttributeManager.parent, dialogs.ModelListCtrl.parent, manager.DispMapPage.parent, gselect.LayerSelect.parent, dialogs.TextLayerDialog.parent, forms.CmdPanel.parent, manager.GCP.parent, ghelp.HelpWindow.parent, model.ModelAction.parent, dialogs.GroupDialog.parent, goutput.GMStdout.parent, dialogs.ItemCheckListCtrl.parent, goutput.GMStderr.parent, frame.ModelCanvas.parent, goutput.GMStc.parent, model.ModelData.parent, gselect.GdalSelect.parent, goutput.PyStc.parent, dialogs.MapLayersDialog.parent, model.ModelRelation.parent, frame.VariablePanel.parent, model.ModelItem.parent, frame.ItemPanel.parent, frame.PythonPanel.parent, dialogs.ImportDialog.parent, forms.GUI.parent, dialogs.LayersList.parent, dialogs.SetOpacityDialog.parent, dialogs.ImageSizeDialog.parent, model.ModelParamDialog.parent, manager.TableListCtrl.parent, manager.LayerListCtrl.parent, manager.GrSettingsDialog.parent, manager.LayerBook.parent, mapwindow.BufferedWindow.pdc, mapwindow.BufferedWindow.pdcDec, mapwindow.BufferedWindow.pdcTmp, mapwindow.BufferedWindow.polycoords, mapwindow.BufferedWindow.resize, widgets.SetValue(), mapwindow.BufferedWindow.textdict, workspace.ProcessWorkspaceFile.tree, mapwindow.MapWindow.tree, menudata.MenuData.tree, mapdisplay.MapFrame.tree, ghelp.MenuTreeWindow.tree, and model.ProcessModelFile.tree.
Referenced by mapwindow.GLWindow.DoPaint(), mapwindow.BufferedWindow.GoTo(), mapwindow.BufferedWindow.OnIdle(), mapwindow.VDigitWindow.OnLeftDownAddLine(), mapwindow.VDigitWindow.OnLeftDownDisplayCA(), mapwindow.VDigitWindow.OnLeftDownUndo(), mapwindow.BufferedWindow.OnLeftUp(), mapwindow.VDigitWindow.OnLeftUpBulkLine(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), mapwindow.VDigitWindow.OnLeftUpCopyLine(), mapwindow.VDigitWindow.OnLeftUpModifyLine(), mapwindow.VDigitWindow.OnLeftUpVarious(), mapwindow.BufferedWindow.OnMiddleUp(), mapwindow.BufferedWindow.OnMouseWheel(), mapdisplay.MapFrame.OnZoomRegion(), frame.MapFrame.OnZoomRegion(), mapwindow.BufferedWindow.SaveToFile(), mapwindow.BufferedWindow.ZoomBack(), mapwindow.BufferedWindow.ZoomToDefault(), mapwindow.BufferedWindow.ZoomToMap(), mapwindow.BufferedWindow.ZoomToSaved(), and mapwindow.BufferedWindow.ZoomToWind().
| def mapwindow.BufferedWindow.Zoom | ( | self, | |
| begin, | |||
| end, | |||
| zoomtype | |||
| ) |
Calculates new region while (un)zoom/pan-ing.
Definition at line 1366 of file mapdisp/mapwindow.py.
References mapwindow.VDigitWindow._zoom(), max, min, mapwindow.MapWindow.Pixel2Cell(), mapwindow.BufferedWindow.redrawAll, and mapwindow.BufferedWindow.ZoomHistory().
Referenced by mapwindow.BufferedWindow.OnLeftUp(), frame.PsMapBufferedWindow.OnLeftUp(), mapwindow.BufferedWindow.OnMiddleUp(), mapwindow.BufferedWindow.OnMouseWheel(), frame.PsMapBufferedWindow.OnMouseWheel(), frame.PsMapBufferedWindow.Pan(), and frame.PsMapBufferedWindow.ZoomAll().
| def mapwindow.BufferedWindow.ZoomBack | ( | self | ) |
Zoom to previous extents in zoomhistory list.
Definition at line 1437 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.zoomhistory.
| def mapwindow.BufferedWindow.ZoomHistory | ( | self, | |
| n, | |||
| s, | |||
| e, | |||
| w | |||
| ) |
Manages a list of last 10 zoom extents.
| n,s,e,w | north, south, east, west |
Definition at line 1461 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.zoomhistory.
Referenced by mapwindow.BufferedWindow.GoTo(), mapwindow.BufferedWindow.Zoom(), mapwindow.BufferedWindow.ZoomToDefault(), mapwindow.BufferedWindow.ZoomToMap(), mapwindow.BufferedWindow.ZoomToSaved(), and mapwindow.BufferedWindow.ZoomToWind().
| def mapwindow.BufferedWindow.ZoomToDefault | ( | self | ) |
Set display geometry to match default region settings.
Definition at line 1559 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.ZoomHistory().
| def mapwindow.BufferedWindow.ZoomToMap | ( | self, | |
layers = None, |
|||
ignoreNulls = False, |
|||
render = True |
|||
| ) |
Set display extents to match selected raster or vector map(s).
| layers | list of layers to be zoom to |
| ignoreNulls | True to ignore null-values (valid only for rasters) |
| render | True to re-render display |
Definition at line 1497 of file mapdisp/mapwindow.py.
References mapwindow.MapWindow.GetSelectedLayer(), mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.ZoomHistory().
| def mapwindow.BufferedWindow.ZoomToSaved | ( | self | ) |
Set display geometry to match extents in saved region file.
Definition at line 1616 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.ZoomHistory().
| def mapwindow.BufferedWindow.ZoomToWind | ( | self | ) |
Set display geometry to match computational region settings (set with g.region)
Definition at line 1546 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.ZoomHistory().
self.Map.AlignExtentFromDisplay()
Definition at line 400 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DragMap(), and mapwindow.BufferedWindow.OnPaint().
Definition at line 349 of file mapdisp/mapwindow.py.
Definition at line 86 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.OnButtonDClick(), and mapwindow.BufferedWindow.OnLeftUp().
Definition at line 90 of file mapdisp/mapwindow.py.
Definition at line 93 of file mapdisp/mapwindow.py.
Referenced by mapwindow.VDigitWindow.OnLeftDownAddLine(), mapwindow.VDigitWindow.OnLeftDownDisplayCA(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), and mapwindow.VDigitWindow.OnLeftUpVarious().
Definition at line 110 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.OnButtonDClick(), mapwindow.GLWindow.OnDClick(), mapwindow.GLWindow.OnDragging(), mapwindow.BufferedWindow.OnDragging(), mapwindow.GLWindow.OnLeftDown(), mapwindow.GLWindow.OnLeftUp(), and mapwindow.BufferedWindow.OnLeftUp().
Definition at line 57 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DragMap().
Definition at line 92 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.OnButtonDClick(), mapwindow.GLWindow.OnDClick(), and mapwindow.GLWindow.OnLeftDown().
Definition at line 1045 of file mapdisp/mapwindow.py.
Definition at line 83 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.Draw(), histogram.BufferedWindow.GetImage(), mapwindow.BufferedWindow.GetImage(), mapwindow.BufferedWindow.GetOverlay(), mapwindow.BufferedWindow.SaveToFile(), histogram.BufferedWindow.UpdateHist(), and mapwindow.BufferedWindow.UpdateMap().
Definition at line 79 of file mapdisp/mapwindow.py.
Referenced by histogram.BufferedWindow.OnSize(), colorrules.BufferedWindow.OnSize(), histogram.BufferedWindow.UpdateHist(), mapwindow.BufferedWindow.UpdateMap(), and colorrules.BufferedWindow.UpdatePreview().
Definition at line 111 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DragItem().
Definition at line 65 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.ClearLines(), mapwindow.BufferedWindow.DrawCross(), and mapwindow.BufferedWindow.MouseDraw().
Definition at line 78 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.GetImage(), histogram.BufferedWindow.UpdateHist(), mapwindow.BufferedWindow.UpdateMap(), and colorrules.BufferedWindow.UpdatePreview().
Definition at line 81 of file mapdisp/mapwindow.py.
Referenced by mapwindow.GLWindow.CreateTexture(), mapwindow.GLWindow.GetLegendRect(), mapwindow.GLWindow.OnLeftUp(), mapwindow.BufferedWindow.OnLeftUp(), mapwindow.BufferedWindow.ResizeLegend(), mapwindow.BufferedWindow.SaveToFile(), mapwindow.BufferedWindow.UpdateMap(), and mapwindow.GLWindow.UpdateOverlays().
Definition at line 117 of file mapdisp/mapwindow.py.
Referenced by histogram.BufferedWindow.EraseMap(), mapwindow.BufferedWindow.EraseMap(), colorrules.BufferedWindow.EraseMap(), histogram.BufferedWindow.SaveToFile(), mapwindow.BufferedWindow.SaveToFile(), histogram.BufferedWindow.UpdateHist(), mapwindow.BufferedWindow.UpdateMap(), and colorrules.BufferedWindow.UpdatePreview().
Definition at line 121 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.EraseMap(), and mapwindow.BufferedWindow.UpdateMap().
Definition at line 123 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.ClearLines(), mapwindow.BufferedWindow.DrawLines(), mapwindow.BufferedWindow.EraseMap(), mapwindow.BufferedWindow.OnButtonDClick(), mapwindow.BufferedWindow.OnDragging(), frame.PsMapBufferedWindow.OnDragging(), mapwindow.BufferedWindow.OnLeftDown(), mapwindow.VDigitWindow.OnLeftDownAddLine(), mapwindow.VDigitWindow.OnLeftDownEditLine(), mapwindow.BufferedWindow.OnLeftUp(), mapwindow.VDigitWindow.OnLeftUpBulkLine(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), mapwindow.VDigitWindow.OnLeftUpModifyLine(), and mapwindow.BufferedWindow.UpdateMap().
Reimplemented in mapwindow.VDigitWindow.
Definition at line 119 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.EraseMap(), and mapwindow.BufferedWindow.SaveToFile().
Reimplemented in mapwindow.VDigitWindow.
Definition at line 60 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.Draw(), frame.PsMapBufferedWindow.OnDragging(), mapwindow.VDigitWindow.OnLeftDownUndo(), frame.PsMapBufferedWindow.OnLeftUp(), and frame.PsMapBufferedWindow.Zoom().
Definition at line 67 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.ClearLines(), and mapwindow.BufferedWindow.DrawLines().
Reimplemented in mapwindow.VDigitWindow.
Definition at line 63 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DrawLines(), mapwindow.BufferedWindow.OnButtonDClick(), mapwindow.BufferedWindow.OnLeftDown(), mapwindow.VDigitWindow.OnLeftDownBulkLine(), mapwindow.VDigitWindow.OnLeftDownUndo(), mapwindow.VDigitWindow.OnLeftUpBulkLine(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), mapwindow.VDigitWindow.OnLeftUpVarious(), mapwindow.VDigitWindow.SetToolbar(), and mapwindow.BufferedWindow.UpdateMap().
Reimplemented in mapwindow.VDigitWindow.
Definition at line 61 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.Draw(), mapwindow.BufferedWindow.DrawCompRegionExtent(), and mapwindow.VDigitWindow.OnLeftDownUndo().
Definition at line 75 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.MouseActions(), and mapwindow.BufferedWindow.OnMouseWheel().
self.OnSize(None)
self.pdcTmp.DrawToDCClipped(dc, rgn)
Reimplemented in mapwindow.VDigitWindow.
Definition at line 102 of file mapdisp/mapwindow.py.
Referenced by mapwindow.VDigitWindow.OnLeftDownUndo(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), mapwindow.BufferedWindow.OnPaint(), mapwindow.BufferedWindow.OnRightUp(), and mapwindow.BufferedWindow.Zoom().
Definition at line 682 of file mapdisp/mapwindow.py.
Definition at line 56 of file mapdisp/mapwindow.py.
Referenced by histogram.BufferedWindow.OnIdle(), mapwindow.BufferedWindow.OnIdle(), colorrules.BufferedWindow.OnIdle(), histogram.BufferedWindow.OnSize(), colorrules.BufferedWindow.OnSize(), histogram.BufferedWindow.UpdateHist(), mapwindow.BufferedWindow.UpdateMap(), and colorrules.BufferedWindow.UpdatePreview().
Definition at line 84 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.Draw().
Definition at line 85 of file mapdisp/mapwindow.py.
Referenced by mapwindow.GLWindow.CreateTexture(), mapwindow.BufferedWindow.DragItem(), mapwindow.GLWindow.OnLeftUp(), mapwindow.BufferedWindow.OnLeftUp(), mapwindow.BufferedWindow.SaveToFile(), mapwindow.BufferedWindow.UpdateMap(), and mapwindow.GLWindow.UpdateOverlays().
Definition at line 89 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.ResetZoomHistory(), mapwindow.BufferedWindow.ZoomBack(), and mapwindow.BufferedWindow.ZoomHistory().
Definition at line 91 of file mapdisp/mapwindow.py.
Referenced by mapwindow.GLWindow.OnLeftUp(), and mapwindow.BufferedWindow.OnLeftUp().