GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
frame.PsMapBufferedWindow Class Reference

A buffered window class. More...

Inheritance diagram for frame.PsMapBufferedWindow:
Collaboration diagram for frame.PsMapBufferedWindow:

Public Member Functions

def __init__
 
def Clear
 Clear canvas and set paper. More...
 
def CanvasPaperCoordinates
 Converts canvas (pixel) -> paper (inch) coordinates and size and vice versa. More...
 
def SetPage
 Sets and changes page, redraws paper. More...
 
def modifyRectangle
 Recalculates rectangle not to have negative size. More...
 
def RecalculateEN
 Recalculate east and north for texts (eps, points) after their or map's movement. More...
 
def OnPaint
 Draw pseudo DC to buffer. More...
 
def MouseActions
 Mouse motion and button click notifier. More...
 
def OnMouseWheel
 Mouse wheel scrolled. More...
 
def OnMouseMoving
 Mouse cursor moving. More...
 
def OnLeftDown
 Left mouse button pressed. More...
 
def OnLeftUp
 Left mouse button released. More...
 
def OnButtonDClick
 Open object dialog for editing. More...
 
def OnDragging
 Process panning/resizing/drawing/moving. More...
 
def OnMiddleDown
 Middle mouse button pressed. More...
 
def Pan
 Move canvas while dragging. More...
 
def RecalculatePosition
 
def ComputeZoom
 Computes zoom factor and scroll view. More...
 
def Zoom
 Zoom to specified region, scroll view, redraw. More...
 
def ZoomAll
 Zoom to full extent. More...
 
def Draw
 Draw object with given pen and brush. More...
 
def DrawGraphics
 Draw point/line/rectangle with given color and width. More...
 
def DrawBitmap
 Draw bitmap using PIL. More...
 
def DrawRotText
 

Data Fields

 parent
 
 resize
 
 mouse
 
 cursors
 
 preview
 
 pen
 
 brush
 
 instruction
 
 openDialogs
 
 pageId
 
 objectId
 
 itemLabelsDict
 
 itemLabels
 
 pdc
 
 pdcObj
 
 pdcPaper
 
 pdcTmp
 
 pdcImage
 
 idBoxTmp
 
 idZoomBoxTmp
 
 idResizeBoxTmp
 
 idLinePointsTmp
 
 resizeBoxSize
 
 showResizeHelp
 
 dragId
 
 image
 
 imageId
 
 imgName
 
 currScale
 
 begin
 
 constraint
 
 mapBounds
 
 currentLinePoint
 

Detailed Description

A buffered window class.

Parameters
parentparent window
kwargsother wx.Window parameters

Definition at line 1076 of file psmap/frame.py.

Constructor & Destructor Documentation

def frame.PsMapBufferedWindow.__init__ (   self,
  parent,
  id = wx.ID_ANY,
  style = wx.NO_FULL_REPAINT_ON_RESIZE,
  kwargs 
)

Definition at line 1084 of file psmap/frame.py.

Member Function Documentation

def frame.PsMapBufferedWindow.CanvasPaperCoordinates (   self,
  rect,
  canvasToPaper = True 
)
def frame.PsMapBufferedWindow.Clear (   self)
def frame.PsMapBufferedWindow.ComputeZoom (   self,
  rect 
)
def frame.PsMapBufferedWindow.Draw (   self,
  pen,
  brush,
  pdc,
  drawid = None,
  pdctype = 'rect',
  bb = wx.Rect(0,0,
  lineCoords = None 
)
def frame.PsMapBufferedWindow.DrawBitmap (   self,
  pdc,
  filePath,
  rotation,
  bbox 
)

Draw bitmap using PIL.

Definition at line 2006 of file psmap/frame.py.

References utils.PilImageToWxImage().

Referenced by frame.PsMapBufferedWindow.Draw().

def frame.PsMapBufferedWindow.DrawGraphics (   self,
  drawid,
  shape,
  color,
  bb,
  width = None,
  fcolor = None,
  lineCoords = None 
)

Draw point/line/rectangle with given color and width.

Parameters
drawidid of drawn object
shapedrawn shape: 'point'/'line'/'rectangle'
colorpen outline color ('RRR:GGG:BBB')
fcolorbrush fill color, if meaningful ('RRR:GGG:BBB')
widthpen width
bbbounding box
lineCoordsline coordinates (for line only)

Definition at line 1973 of file psmap/frame.py.

References utils.convertRGB(), frame.PsMapBufferedWindow.currScale, histogram.BufferedWindow.Draw(), mapwindow.BufferedWindow.Draw(), wxnviz.Nviz.Draw(), colorrules.BufferedWindow.Draw(), frame.PsMapBufferedWindow.Draw(), wxnviz.Texture.Draw(), tools.PositionWindow.Draw(), and frame.PsMapBufferedWindow.pdcObj.

Referenced by frame.PsMapBufferedWindow.OnDragging(), and frame.PsMapBufferedWindow.Zoom().

def frame.PsMapBufferedWindow.DrawRotText (   self,
  pdc,
  drawId,
  textDict,
  coords,
  bounds 
)

Definition at line 2027 of file psmap/frame.py.

References utils.convertRGB().

Referenced by frame.PsMapBufferedWindow.Zoom().

def frame.PsMapBufferedWindow.modifyRectangle (   self,
  r 
)

Recalculates rectangle not to have negative size.

Definition at line 1228 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.OnDragging().

def frame.PsMapBufferedWindow.OnDragging (   self,
  event 
)
def frame.PsMapBufferedWindow.OnLeftDown (   self,
  event 
)

Left mouse button pressed.

Select objects, redraw, prepare for moving/resizing.

Definition at line 1374 of file psmap/frame.py.

References mapwindow.MapWindow.mouse, frame.PsMapFrame.mouse, mapwindow.GLWindow.mouse, and frame.PsMapBufferedWindow.mouse.

Referenced by frame.PsMapBufferedWindow.MouseActions().

def frame.PsMapBufferedWindow.OnLeftUp (   self,
  event 
)

Left mouse button released.

Recalculate zooming/resizing/moving and redraw.

Definition at line 1420 of file psmap/frame.py.

References utils.AutoAdjust(), frame.PsMapFrame.brush, frame.PsMapBufferedWindow.brush, frame.PsMapBufferedWindow.CanvasPaperCoordinates(), utils.ComputeSetRegion(), frame.PsMapBufferedWindow.ComputeZoom(), frame.PsMapBufferedWindow.dragId, histogram.BufferedWindow.Draw(), mapwindow.BufferedWindow.Draw(), wxnviz.Nviz.Draw(), colorrules.BufferedWindow.Draw(), frame.PsMapBufferedWindow.Draw(), wxnviz.Texture.Draw(), tools.PositionWindow.Draw(), frame.PsMapBufferedWindow.idZoomBoxTmp, frame.PsMapFrame.instruction, dialogs.PsmapDialog.instruction, dialogs.MapFramePanel.instruction, frame.PsMapBufferedWindow.instruction, dialogs.RasterPanel.instruction, dialogs.VectorPanel.instruction, dialogs.LegendDialog.instruction, mapwindow.MapWindow.mouse, frame.PsMapFrame.mouse, mapwindow.GLWindow.mouse, frame.PsMapBufferedWindow.mouse, frame.PsMapFrame.openDialogs, frame.PsMapBufferedWindow.openDialogs, pyshell.PyShellWindow.parent, ogc_services.WMSDialog.parent, menu.Menu.parent, mapwindow.MapWindow.parent, vclean.VectorCleaningFrame.parent, mcalc_builder.MapCalcFrame.parent, dialogs.RegionDef.parent, extensions.InstallExtensionWindow.parent, sqlbuilder.SQLFrame.parent, histogram.BufferedWindow.parent, dialogs.ModelDataDialog.parent, mapdisp.MapFrameBase.parent, dialogs.DisplayAttributesDialog.parent, colorrules.RulesPanel.parent, frame.PsMapFrame.parent, preferences.PreferencesBaseDialog.parent, manager.Log.parent, tools.NvizToolWindow.parent, goutput.CmdThread.parent, frame.ModelFrame.parent, mapwindow.GLWindow.parent, frame.GMFrame.parent, manager.VirtualAttributeList.parent, toolbars.BaseToolbar.parent, manager.GCPWizard.parent, dialogs.ModelSearchDialog.parent, menu.MenuTreeWindow.parent, forms.UpdateThread.parent, dialogs.PsmapDialog.parent, goutput.GMConsole.parent, wizard.CoordinateSystemPage.parent, widgets.StaticWrapText.parent, ogc_services.LayersList.parent, dialogs.ModelRelationDialog.parent, extensions.ExtensionTree.parent, menu.MenuTree.parent, manager.LocationPage.parent, forms.UpdateQThread.parent, colorrules.ColorTable.parent, wizard.ProjectionsPage.parent, forms.TaskFrame.parent, extensions.UninstallExtensionWindow.parent, dialogs.ModelItemDialog.parent, manager.GroupPage.parent, prompt.GPrompt.parent, extensions.CheckListExtension.parent, dialogs.DecorationDialog.parent, manager.AttributeManager.parent, dialogs.ModelListCtrl.parent, manager.DispMapPage.parent, ghelp.HelpWindow.parent, wizard.ProjParamsPage.parent, gselect.LayerSelect.parent, dialogs.TextLayerDialog.parent, forms.CmdPanel.parent, manager.GCP.parent, wizard.DatumPage.parent, model.ModelAction.parent, dialogs.GroupDialog.parent, dialogs.ItemCheckListCtrl.parent, frame.ModelCanvas.parent, wizard.EllipsePage.parent, goutput.GMStdout.parent, goutput.GMStderr.parent, frame.PsMapBufferedWindow.parent, model.ModelData.parent, gselect.GdalSelect.parent, goutput.GMStc.parent, dialogs.MapLayersDialog.parent, dialogs.VectorPanel.parent, goutput.PyStc.parent, model.ModelRelation.parent, wizard.EPSGPage.parent, frame.VariablePanel.parent, model.ModelItem.parent, frame.ItemPanel.parent, dialogs.ImportDialog.parent, wizard.CustomPage.parent, frame.PythonPanel.parent, wizard.SummaryPage.parent, preferences.CheckListMapset.parent, colorrules.BufferedWindow.parent, wizard.LocationWizard.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, frame.PsMapBufferedWindow.pdcObj, histogram.BufferedWindow.pen, mapwindow.BufferedWindow.pen, frame.PsMapFrame.pen, frame.PsMapBufferedWindow.pen, frame.PsMapBufferedWindow.RecalculatePosition(), utils.SetResolution(), dialogs.updateDialog(), mapwindow.BufferedWindow.Zoom(), and frame.PsMapBufferedWindow.Zoom().

Referenced by frame.PsMapBufferedWindow.MouseActions().

def frame.PsMapBufferedWindow.OnMiddleDown (   self,
  event 
)
def frame.PsMapBufferedWindow.OnMouseWheel (   self,
  event 
)
def frame.PsMapBufferedWindow.OnPaint (   self,
  event 
)
def frame.PsMapBufferedWindow.Pan (   self,
  begin,
  end 
)

Move canvas while dragging.

Parameters
beginx,y coordinates of first point
endx,y coordinates of second point

Definition at line 1695 of file psmap/frame.py.

References mapwindow.BufferedWindow.Zoom(), and frame.PsMapBufferedWindow.Zoom().

Referenced by frame.PsMapBufferedWindow.OnDragging().

def frame.PsMapBufferedWindow.RecalculateEN (   self)

Field Documentation

frame.PsMapBufferedWindow.begin

Definition at line 1380 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.OnDragging().

frame.PsMapBufferedWindow.brush
frame.PsMapBufferedWindow.constraint

Definition at line 1392 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.OnDragging().

frame.PsMapBufferedWindow.currentLinePoint

Definition at line 1399 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.OnDragging().

frame.PsMapBufferedWindow.idBoxTmp

Definition at line 1131 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.OnDragging().

frame.PsMapBufferedWindow.idLinePointsTmp
frame.PsMapBufferedWindow.idResizeBoxTmp
frame.PsMapBufferedWindow.idZoomBoxTmp
frame.PsMapBufferedWindow.image

Definition at line 1144 of file psmap/frame.py.

frame.PsMapBufferedWindow.imageId
frame.PsMapBufferedWindow.imgName

Definition at line 1146 of file psmap/frame.py.

frame.PsMapBufferedWindow.instruction

Definition at line 1102 of file psmap/frame.py.

Referenced by instructions.Instruction.__contains__(), instructions.Instruction.__delitem__(), instructions.Instruction.__getitem__(), instructions.InstructionObject.__getitem__(), instructions.InstructionObject.__setitem__(), instructions.Instruction.__str__(), instructions.MapFrame.__str__(), instructions.PageSetup.__str__(), instructions.Mapinfo.__str__(), instructions.Text.__str__(), instructions.Image.__str__(), instructions.NorthArrow.__str__(), instructions.Point.__str__(), instructions.Line.__str__(), instructions.Rectangle.__str__(), instructions.Scalebar.__str__(), instructions.RasterLegend.__str__(), instructions.VectorLegend.__str__(), instructions.Raster.__str__(), instructions.VProperties.__str__(), instructions.Image.ChangeRefPoint(), frame.PsMapBufferedWindow.Draw(), instructions.Instruction.FindInstructionByType(), instructions.InstructionObject.GetInstruction(), frame.PsMapBufferedWindow.OnButtonDClick(), frame.PsMapBufferedWindow.OnDragging(), frame.PsMapBufferedWindow.OnLeftUp(), instructions.MapFrame.Read(), instructions.Mapinfo.Read(), instructions.Image.Read(), instructions.Point.Read(), instructions.Line.Read(), instructions.Rectangle.Read(), instructions.Scalebar.Read(), instructions.Vector.Read(), frame.PsMapBufferedWindow.RecalculateEN(), frame.PsMapBufferedWindow.RecalculatePosition(), instructions.InstructionObject.SetInstruction(), frame.PsMapBufferedWindow.SetPage(), and frame.PsMapBufferedWindow.Zoom().

frame.PsMapBufferedWindow.itemLabels

Definition at line 1119 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.Draw().

frame.PsMapBufferedWindow.itemLabelsDict

Definition at line 1112 of file psmap/frame.py.

frame.PsMapBufferedWindow.mapBounds

Definition at line 1393 of file psmap/frame.py.

frame.PsMapBufferedWindow.objectId

Definition at line 1108 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.Zoom().

frame.PsMapBufferedWindow.openDialogs

Definition at line 1104 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.OnLeftUp().

frame.PsMapBufferedWindow.pdc

Definition at line 1122 of file psmap/frame.py.

frame.PsMapBufferedWindow.pdcImage

Definition at line 1126 of file psmap/frame.py.

frame.PsMapBufferedWindow.pdcPaper

Definition at line 1124 of file psmap/frame.py.

frame.PsMapBufferedWindow.pdcTmp

Definition at line 1125 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.OnDragging().

frame.PsMapBufferedWindow.pen
frame.PsMapBufferedWindow.resize

Definition at line 1093 of file psmap/frame.py.

frame.PsMapBufferedWindow.resizeBoxSize

Definition at line 1136 of file psmap/frame.py.

frame.PsMapBufferedWindow.showResizeHelp

Definition at line 1137 of file psmap/frame.py.

Referenced by frame.PsMapBufferedWindow.OnMouseMoving().


The documentation for this class was generated from the following file: