GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
A Buffered window class (2D view mode) More...
Public Member Functions | |
def | __init__ |
def | Draw |
Draws map and overlay decorations. More... | |
def | TextBounds |
Return text boundary data. More... | |
def | OnPaint |
Draw PseudoDC's to buffered paint DC. More... | |
def | OnSize |
Scale map image so that it is the same size as the Window. More... | |
def | OnIdle |
Only re-render a composite map image from GRASS during idle time instead of multiple times during resizing. More... | |
def | SaveToFile |
This draws the pseudo DC to a buffer that can be saved to a file. More... | |
def | GetOverlay |
Converts rendered overlay files to wx.Image. More... | |
def | GetImage |
Converts redered map files to wx.Image. More... | |
def | UpdateMap |
Updates the canvas anytime there is a change to the underlaying images or to the geometry of the canvas. More... | |
def | DrawCompRegionExtent |
Draw computational region extent in the display. More... | |
def | IsInRegion |
Test if 'region' is inside of 'refRegion'. More... | |
def | EraseMap |
Erase map canvas. More... | |
def | DragMap |
Drag the entire map image for panning. More... | |
def | DragItem |
Drag an overlay decoration item. More... | |
def | MouseDraw |
Mouse box or line from 'begin' to 'end'. More... | |
def | DrawLines |
Draw polyline in PseudoDC. More... | |
def | DrawCross |
Draw cross in PseudoDC. More... | |
def | MouseActions |
Mouse motion and button click notifier. More... | |
def | OnMouseWheel |
Mouse wheel moved. More... | |
def | OnDragging |
Mouse dragging. More... | |
def | OnLeftDown |
Left mouse button pressed. More... | |
def | OnLeftUp |
Left mouse button released. More... | |
def | OnButtonDClick |
Mouse button double click. More... | |
def | OnRightDown |
Right mouse button pressed. More... | |
def | OnRightUp |
Right mouse button released. More... | |
def | OnMiddleDown |
Middle mouse button pressed. More... | |
def | OnMiddleUp |
Middle mouse button released. More... | |
def | OnMouseEnter |
Mouse entered window and no mouse buttons were pressed. More... | |
def | OnMouseMoving |
Motion event and no mouse buttons were pressed. More... | |
def | ClearLines |
Clears temporary drawn lines from PseudoDC. More... | |
def | Pixel2Cell |
Convert image coordinates to real word coordinates. More... | |
def | Cell2Pixel |
Convert real word coordinates to image coordinates. More... | |
def | ResizeLegend |
def | Zoom |
Calculates new region while (un)zoom/pan-ing. More... | |
def | ZoomBack |
Zoom to previous extents in zoomhistory list. More... | |
def | ZoomHistory |
Manages a list of last 10 zoom extents. More... | |
def | ResetZoomHistory |
Reset zoom history. More... | |
def | ZoomToMap |
Set display extents to match selected raster or vector map(s). More... | |
def | ZoomToWind |
Set display geometry to match computational region settings (set with g.region) More... | |
def | ZoomToDefault |
Set display geometry to match default region settings. More... | |
def | GoTo |
def | DisplayToWind |
Set computational region (WIND file) to match display extents. More... | |
def | ZoomToSaved |
Set display geometry to match extents in saved region file. More... | |
def | SaveRegion |
Save display extents/compulational region to named region file. More... | |
def | Distance |
Calculete distance. More... | |
Public Member Functions inherited from mapwindow.MapWindow | |
def | __init__ |
def | RegisterMouseEventHandler |
Binds event handler. More... | |
def | UnregisterMouseEventHandler |
Unbinds event handler a restores previous state. More... | |
def | Pixel2Cell |
def | Cell2Pixel |
def | OnMotion |
Tracks mouse motion and update statusbar. More... | |
def | GetLastEN |
Returns last coordinates of mouse cursor. More... | |
def | GetLayerByName |
Get layer from layer tree by nam. More... | |
def | GetSelectedLayer |
Get selected layer from layer tree. More... | |
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) More... | |
dragid | |
lastpos | |
pdc | |
pdcVector | |
pdcDec | |
pdcTmp | |
bufferLast | |
buffer | |
self.Map.AlignExtentFromDisplay() More... | |
regionCoords | |
idlist | |
Data Fields inherited from mapwindow.MapWindow | |
parent | |
Map | |
tree | |
lmgr | |
mouse | |
lastEN | |
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 | |||
) |
Definition at line 51 of file mapdisp/mapwindow.py.
def mapwindow.BufferedWindow.Cell2Pixel | ( | self, | |
east, | |||
north | |||
) |
Convert real word coordinates to image coordinates.
Definition at line 1335 of file mapdisp/mapwindow.py.
def mapwindow.BufferedWindow.ClearLines | ( | self, | |
pdc = None |
|||
) |
Clears temporary drawn lines from PseudoDC.
Definition at line 1286 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 1606 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 1731 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 749 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 732 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 676 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 862 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 831 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 721 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 512 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 489 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 1587 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 703 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 919 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 780 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 1178 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 1011 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 421 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 1049 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 1093 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow._computeZoomToPointAndRecenter(), 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.MapWindow.parent, sqlbuilder.SQLFrame.parent, dialogs.ModelDataDialog.parent, mapdisp.MapFrameBase.parent, dialogs.DisplayAttributesDialog.parent, manager.Log.parent, goutput.CmdThread.parent, frame.ModelFrame.parent, manager.VirtualAttributeList.parent, manager.GCPWizard.parent, dialogs.ModelSearchDialog.parent, forms.UpdateThread.parent, goutput.GMConsole.parent, dialogs.ModelRelationDialog.parent, manager.LocationPage.parent, forms.UpdateQThread.parent, forms.TaskFrame.parent, dialogs.ModelItemDialog.parent, manager.GroupPage.parent, dialogs.DecorationDialog.parent, manager.AttributeManager.parent, dialogs.ModelListCtrl.parent, manager.DispMapPage.parent, ghelp.HelpWindow.parent, gselect.LayerSelect.parent, dialogs.TextLayerDialog.parent, forms.CmdPanel.parent, manager.GCP.parent, model.ModelAction.parent, dialogs.GroupDialog.parent, dialogs.ItemCheckListCtrl.parent, frame.ModelCanvas.parent, goutput.GMStdout.parent, goutput.GMStderr.parent, model.ModelData.parent, gselect.GdalSelect.parent, goutput.GMStc.parent, dialogs.MapLayersDialog.parent, goutput.PyStc.parent, model.ModelRelation.parent, frame.VariablePanel.parent, model.ModelItem.parent, frame.ItemPanel.parent, dialogs.ImportDialog.parent, frame.PythonPanel.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.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 1238 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 1246 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 1263 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 1277 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 967 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow._computeZoomToPointAndRecenter(), 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 1213 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 1224 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 387 of file mapdisp/mapwindow.py.
def mapwindow.BufferedWindow.Pixel2Cell | ( | self, | |
x, | |||
y | |||
) |
Convert image coordinates to real word coordinates.
x,y | image coordinates |
Definition at line 1308 of file mapdisp/mapwindow.py.
def mapwindow.BufferedWindow.ResetZoomHistory | ( | self | ) |
Reset zoom history.
Definition at line 1507 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.zoomhistory.
def mapwindow.BufferedWindow.ResizeLegend | ( | self, | |
begin, | |||
end | |||
) |
Definition at line 1357 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.overlays, and render.Map.overlays.
Referenced by mapwindow.BufferedWindow.OnLeftUp().
def mapwindow.BufferedWindow.SaveRegion | ( | self, | |
display = True |
|||
) |
Save display extents/compulational region to named region file.
display | True for display extends otherwise computational region |
Definition at line 1661 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow._saveCompRegion(), mapwindow.BufferedWindow._saveDisplayRegion(), and gcmd.RunCommand().
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 430 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(), model.ModelLoop.Update(), frame.VariablePanel.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 534 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, goutput.GMConsole.parent, dialogs.ModelRelationDialog.parent, manager.LocationPage.parent, forms.UpdateQThread.parent, forms.TaskFrame.parent, dialogs.ModelItemDialog.parent, manager.GroupPage.parent, dialogs.DecorationDialog.parent, manager.AttributeManager.parent, dialogs.ModelListCtrl.parent, manager.DispMapPage.parent, ghelp.HelpWindow.parent, gselect.LayerSelect.parent, dialogs.TextLayerDialog.parent, forms.CmdPanel.parent, manager.GCP.parent, model.ModelAction.parent, dialogs.GroupDialog.parent, dialogs.ItemCheckListCtrl.parent, frame.ModelCanvas.parent, goutput.GMStdout.parent, goutput.GMStderr.parent, model.ModelData.parent, gselect.GdalSelect.parent, goutput.GMStc.parent, dialogs.MapLayersDialog.parent, goutput.PyStc.parent, model.ModelRelation.parent, frame.VariablePanel.parent, model.ModelItem.parent, frame.ItemPanel.parent, dialogs.ImportDialog.parent, frame.PythonPanel.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, 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 1380 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 1451 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 1475 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 1573 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 1511 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 1630 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 1560 of file mapdisp/mapwindow.py.
References mapwindow.BufferedWindow.UpdateMap(), and mapwindow.BufferedWindow.ZoomHistory().
mapwindow.BufferedWindow.buffer |
self.Map.AlignExtentFromDisplay()
Definition at line 401 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DragMap(), and mapwindow.BufferedWindow.OnPaint().
mapwindow.BufferedWindow.bufferLast |
Definition at line 350 of file mapdisp/mapwindow.py.
mapwindow.BufferedWindow.currtxtid |
Definition at line 86 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.OnButtonDClick(), and mapwindow.BufferedWindow.OnLeftUp().
mapwindow.BufferedWindow.currzoom |
Definition at line 90 of file mapdisp/mapwindow.py.
mapwindow.BufferedWindow.dialogOffset |
Definition at line 93 of file mapdisp/mapwindow.py.
Referenced by mapwindow.VDigitWindow.OnLeftDownAddLine(), mapwindow.VDigitWindow.OnLeftDownDisplayCA(), mapwindow.VDigitWindow.OnLeftUpConnectLine(), and mapwindow.VDigitWindow.OnLeftUpVarious().
mapwindow.BufferedWindow.dragid |
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().
mapwindow.BufferedWindow.dragimg |
Definition at line 57 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DragMap().
mapwindow.BufferedWindow.hitradius |
Definition at line 92 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.OnButtonDClick(), mapwindow.GLWindow.OnDClick(), and mapwindow.GLWindow.OnLeftDown().
mapwindow.BufferedWindow.idlist |
Definition at line 1079 of file mapdisp/mapwindow.py.
mapwindow.BufferedWindow.imagedict |
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().
mapwindow.BufferedWindow.img |
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().
mapwindow.BufferedWindow.lastpos |
Definition at line 111 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.DragItem().
mapwindow.BufferedWindow.lineid |
Definition at line 65 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.ClearLines(), mapwindow.BufferedWindow.DrawCross(), and mapwindow.BufferedWindow.MouseDraw().
mapwindow.BufferedWindow.mapfile |
Definition at line 78 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.GetImage(), histogram.BufferedWindow.UpdateHist(), mapwindow.BufferedWindow.UpdateMap(), and colorrules.BufferedWindow.UpdatePreview().
mapwindow.BufferedWindow.overlays |
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().
mapwindow.BufferedWindow.pdc |
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().
mapwindow.BufferedWindow.pdcDec |
Definition at line 121 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.EraseMap(), and mapwindow.BufferedWindow.UpdateMap().
mapwindow.BufferedWindow.pdcTmp |
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().
mapwindow.BufferedWindow.pdcVector |
Definition at line 119 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.EraseMap(), and mapwindow.BufferedWindow.SaveToFile().
mapwindow.BufferedWindow.pen |
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().
mapwindow.BufferedWindow.plineid |
Definition at line 67 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.ClearLines(), and mapwindow.BufferedWindow.DrawLines().
mapwindow.BufferedWindow.polycoords |
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().
mapwindow.BufferedWindow.polypen |
Definition at line 61 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.Draw(), mapwindow.BufferedWindow.DrawCompRegionExtent(), and mapwindow.VDigitWindow.OnLeftDownUndo().
mapwindow.BufferedWindow.processMouse |
Definition at line 75 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.MouseActions(), and mapwindow.BufferedWindow.OnMouseWheel().
mapwindow.BufferedWindow.redrawAll |
self.OnSize(None)
self.pdcTmp.DrawToDCClipped(dc, rgn)
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().
mapwindow.BufferedWindow.regionCoords |
Definition at line 694 of file mapdisp/mapwindow.py.
mapwindow.BufferedWindow.resize |
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().
mapwindow.BufferedWindow.select |
Definition at line 84 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.Draw().
mapwindow.BufferedWindow.textdict |
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().
mapwindow.BufferedWindow.zoomhistory |
Definition at line 89 of file mapdisp/mapwindow.py.
Referenced by mapwindow.BufferedWindow.ResetZoomHistory(), mapwindow.BufferedWindow.ZoomBack(), and mapwindow.BufferedWindow.ZoomHistory().
mapwindow.BufferedWindow.zoomtype |
Definition at line 91 of file mapdisp/mapwindow.py.
Referenced by mapwindow.GLWindow.OnLeftUp(), and mapwindow.BufferedWindow.OnLeftUp().