GRASS Programmer's Manual
6.4.2(2012)
|
Data Structures | |
class | PsMapFrame |
class | PsMapBufferedWindow |
A buffered window class. More... | |
Functions | |
def | getFile |
busy.Destroy() | |
def | OnInstructionFile |
def | OnLoadFile |
Load file and read instructions. | |
def | OnPageSetup |
Specify paper size, margins and orientation. | |
def | OnPointer |
def | OnPan |
def | OnZoomIn |
def | OnZoomOut |
def | OnZoomAll |
def | OnAddMap |
Add or edit map frame. | |
def | OnAddRaster |
Add raster map. | |
def | OnAddVect |
Add vector map. | |
def | OnDecoration |
Decorations overlay menu. | |
def | OnAddScalebar |
Add scalebar. | |
def | OnAddLegend |
Add raster or vector legend. | |
def | OnAddMapinfo |
def | OnAddText |
Show dialog for text adding and editing. | |
def | getModifiedTextBounds |
computes bounding box of rotated text, not very precisely | |
def | makePSFont |
creates a wx.Font object from selected postscript font. | |
def | getTextExtent |
Estimates bounding rectangle of text. | |
def | getInitMap |
Create default map frame when no map is selected, needed for coordinates in map units. | |
def | OnDelete |
def | deleteObject |
Deletes object, his id and redraws. | |
def | DialogDataChanged |
def | OnPageChanged |
Flatnotebook page has changed. | |
def | OnPageChanging |
Flatnotebook page is changing. | |
def | OnHelp |
Show help. | |
def | OnAbout |
Display About window. | |
def | OnCloseWindow |
Close window. | |
def | DrawImage |
Draw preview image to pseudoDC. | |
def | DrawPaper |
Draw paper and margins. | |
def | ImageRect |
Returns image centered in canvas, computes scale. | |
def | RedrawSelectBox |
Redraws select box when selected object changes its size. | |
def | UpdateMapLabel |
Updates map frame label. | |
def | OnSize |
Init image size to match window size. | |
def | OnIdle |
Only re-render a image during idle time instead of multiple times during resizing. | |
def | ScaleRect |
Scale rectangle. | |
def | main |
Variables | |
haveImage = True | |
tuple | im = Image.open(event.userData['filename']) |
wx.BusyInfo does not display the message busy = wx.BusyInfo(message = "Generating preview, wait please", parent = self) | |
tuple | message = _("Unable to generate preview. %s") |
tuple | rect = self.previewCanvas.ImageRect() |
tuple | dlg |
dlg = MapDialog(parent = self, id = id, settings = self.instruction, notebook = notebook) dlg.ShowModal() | |
tuple | fn = self.parent.makePSFont(textDict) |
if textDict['border'] != 'none' and not rot: units = UnitConversion(self) borderWidth = units.convert(value = textDict['width'], fromUnit = 'point', toUnit = 'pixel' ) * self.currScale pdc.SetPen(wx.Pen(colour = convertRGB(textDict['border']), width = borderWidth)) pdc.DrawRectangle(*bounds) | |
instruction | |
objectId | |
pageId | |
mouseOld | |
currentPage | |
cursorOld | |
actionOld | |
currScale | |
dragId | |
_buffer | |
resize |
def gui_modules.psmap.deleteObject | ( | self, | |
id | |||
) |
def gui_modules.psmap.DialogDataChanged | ( | self, | |
id | |||
) |
Definition at line 790 of file psmap.py.
References gui_modules::gcmd.RunCommand(), gui_modules::psmap_dialogs.SetResolution(), gui_modules::utils.split(), gui_modules::psmap_dialogs.type, and gui_modules::psmap_dialogs.updateDialog().
def gui_modules.psmap.DrawImage | ( | self, | |
rect | |||
) |
def gui_modules.psmap.DrawPaper | ( | self, | |
rect | |||
) |
def gui_modules.psmap.getFile | ( | self, | |
wildcard | |||
) |
def gui_modules.psmap.getInitMap | ( | self | ) |
Create default map frame when no map is selected, needed for coordinates in map units.
Definition at line 739 of file psmap.py.
References gui_modules::psmap_dialogs.GetMapBounds().
def gui_modules.psmap.getModifiedTextBounds | ( | self, | |
x, | |||
y, | |||
textExtent, | |||
rotation | |||
) |
def gui_modules.psmap.getTextExtent | ( | self, | |
textDict | |||
) |
def gui_modules.psmap.ImageRect | ( | self | ) |
def gui_modules.psmap.main | ( | void | ) |
def gui_modules.psmap.makePSFont | ( | self, | |
textDict | |||
) |
creates a wx.Font object from selected postscript font.
To be used for estimating bounding rectangle of text
Definition at line 679 of file psmap.py.
References gui_modules::utils.split().
def gui_modules.psmap.OnAbout | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnAddLegend | ( | self, | |
event, | |||
page = 0 |
|||
) |
Add raster or vector legend.
Definition at line 624 of file psmap.py.
Referenced by gui_modules.goutput.GMConsole.RunCmd().
def gui_modules.psmap.OnAddMap | ( | self, | |
event, | |||
notebook = False |
|||
) |
Add or edit map frame.
Definition at line 464 of file psmap.py.
References gui_modules::psmap_dialogs.OnOK().
def gui_modules.psmap.OnAddMapinfo | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnAddRaster | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnAddScalebar | ( | self, | |
event | |||
) |
Add scalebar.
Definition at line 610 of file psmap.py.
References gui_modules::psmap_dialogs.projInfo().
def gui_modules.psmap.OnAddText | ( | self, | |
event, | |||
id = None |
|||
) |
Show dialog for text adding and editing.
Definition at line 650 of file psmap.py.
References gui_modules::psmap_dialogs.OnApply().
def gui_modules.psmap.OnAddVect | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnCloseWindow | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnDecoration | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnDelete | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnHelp | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnIdle | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnInstructionFile | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnLoadFile | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnPageChanged | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnPageChanging | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnPageSetup | ( | self, | |
event = None |
|||
) |
def gui_modules.psmap.OnPan | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnPointer | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnSize | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnZoomAll | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnZoomIn | ( | self, | |
event | |||
) |
def gui_modules.psmap.OnZoomOut | ( | self, | |
event | |||
) |
def gui_modules.psmap.RedrawSelectBox | ( | self, | |
id | |||
) |
def gui_modules.psmap.ScaleRect | ( | self, | |
rect, | |||
scale | |||
) |
def gui_modules.psmap.UpdateMapLabel | ( | self | ) |
Updates map frame label.
Definition at line 1656 of file psmap.py.
References gui_modules::utils.split().
tuple gui_modules::psmap::dlg |
dlg = MapDialog(parent = self, id = id, settings = self.instruction, notebook = notebook) dlg.ShowModal()
dlg = MainVectorDialog(self, id = id, settings = self.instruction) dlg.ShowModal()
dlg = RasterDialog(self, id = id, settings = self.instruction) dlg.ShowModal()
tuple gui_modules::psmap::fn = self.parent.makePSFont(textDict) |
if textDict['border'] != 'none' and not rot: units = UnitConversion(self) borderWidth = units.convert(value = textDict['width'], fromUnit = 'point', toUnit = 'pixel' ) * self.currScale pdc.SetPen(wx.Pen(colour = convertRGB(textDict['border']), width = borderWidth)) pdc.DrawRectangle(*bounds)
Definition at line 1574 of file psmap.py.
Referenced by gui_modules.menuform.cmdPanel.OnUpdateDialog(), and Vect_net_shortest_path_coor2().
tuple gui_modules::psmap::im = Image.open(event.userData['filename']) |
wx.BusyInfo does not display the message busy = wx.BusyInfo(message = "Generating preview, wait please", parent = self)
Definition at line 313 of file psmap.py.
Referenced by class_discont().
tuple gui_modules::psmap::message = _("Unable to generate preview. %s") |
tuple gui_modules::psmap::rect = self.previewCanvas.ImageRect() |