GRASS Programmer's Manual  6.5.svn(2012)-r51648
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
frame.PsMapBufferedWindow Class Reference

A buffered window class. More...

Public Member Functions

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

Data Fields

 parent
 resize
 mouse
 cursors
 preview
 pen
 brush
 instruction
 openDialogs
 pageId
 objectId
 itemLabelsDict
 itemLabels
 pdc
 pdcObj
 pdcPaper
 pdcTmp
 pdcImage
 font
 idBoxTmp
 idZoomBoxTmp
 idResizeBoxTmp
 idLinePointsTmp
 resizeBoxSize
 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 1037 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 1045 of file psmap/frame.py.


Member Function Documentation

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 1960 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 1927 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 
)

Recalculates rectangle not to have negative size.

Definition at line 1190 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 1329 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 1375 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, menu.Menu.parent, ogc_services.WMSDialog.parent, mapwindow.MapWindow.parent, vclean.VectorCleaningFrame.parent, mcalc_builder.MapCalcFrame.parent, dialogs.RegionDef.parent, extensions.InstallExtensionWindow.parent, sqlbuilder.SQLFrame.parent, mapdisp.MapFrameBase.parent, histogram.BufferedWindow.parent, dialogs.ModelDataDialog.parent, dialogs.DisplayAttributesDialog.parent, preferences.PreferencesBaseDialog.parent, colorrules.RulesPanel.parent, frame.PsMapFrame.parent, manager.Log.parent, tools.NvizToolWindow.parent, frame.ModelFrame.parent, goutput.CmdThread.parent, mapwindow.GLWindow.parent, frame.GMFrame.parent, manager.VirtualAttributeList.parent, toolbars.BaseToolbar.parent, manager.GCPWizard.parent, dialogs.ModelSearchDialog.parent, forms.UpdateThread.parent, dialogs.PsmapDialog.parent, ghelp.MenuTreeWindow.parent, goutput.GMConsole.parent, wizard.CoordinateSystemPage.parent, widgets.StaticWrapText.parent, ogc_services.LayersList.parent, dialogs.ModelRelationDialog.parent, extensions.ExtensionTree.parent, manager.LocationPage.parent, forms.UpdateQThread.parent, colorrules.ColorTable.parent, wizard.ProjectionsPage.parent, ghelp.MenuTree.parent, forms.TaskFrame.parent, dialogs.ModelItemDialog.parent, extensions.UninstallExtensionWindow.parent, manager.GroupPage.parent, prompt.GPrompt.parent, extensions.CheckListExtension.parent, dialogs.DecorationDialog.parent, manager.AttributeManager.parent, dialogs.ModelListCtrl.parent, manager.DispMapPage.parent, wizard.ProjParamsPage.parent, gselect.LayerSelect.parent, dialogs.TextLayerDialog.parent, forms.CmdPanel.parent, manager.GCP.parent, ghelp.HelpWindow.parent, wizard.DatumPage.parent, model.ModelAction.parent, dialogs.GroupDialog.parent, goutput.GMStdout.parent, dialogs.ItemCheckListCtrl.parent, goutput.GMStderr.parent, frame.ModelCanvas.parent, wizard.EllipsePage.parent, goutput.GMStc.parent, frame.PsMapBufferedWindow.parent, model.ModelData.parent, gselect.GdalSelect.parent, goutput.PyStc.parent, dialogs.MapLayersDialog.parent, wizard.EPSGPage.parent, dialogs.VectorPanel.parent, model.ModelRelation.parent, frame.VariablePanel.parent, model.ModelItem.parent, frame.ItemPanel.parent, frame.PythonPanel.parent, dialogs.ImportDialog.parent, wizard.CustomPage.parent, preferences.CheckListMapset.parent, wizard.SummaryPage.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.Pan (   self,
  begin,
  end 
)

Move canvas while dragging.

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

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

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

Referenced by frame.PsMapBufferedWindow.OnDragging().


Field Documentation

Definition at line 1063 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().

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


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