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

A Buffered window class. More...

Inheritance diagram for histogram.BufferedWindow:
Collaboration diagram for histogram.BufferedWindow:

Public Member Functions

def __init__
 
def Draw
 Draws histogram or clears window. More...
 
def OnPaint
 Draw psuedo DC to buffer. More...
 
def OnSize
 Init image size to match window size. More...
 
def OnIdle
 Only re-render a histogram image from GRASS during idle time instead of multiple times during resizing. More...
 
def SaveToFile
 This will save the contents of the buffer to the specified file. More...
 
def GetImage
 Converts files to wx.Image. More...
 
def UpdateHist
 Update canvas if histogram options changes or window changes geometry. More...
 
def EraseMap
 Erase the map display. More...
 

Data Fields

 parent
 
 Map
 
 mapname
 
 render
 
 resize
 
 dragimg
 
 pen
 
 mapfile
 
 img
 
 imagedict
 
 pdc
 

Detailed Description

A Buffered window class.

When the drawing needs to change, you app needs to call the UpdateHist() method. Since the drawing is stored in a bitmap, you can also save the drawing to file by calling the SaveToFile(self,file_name,file_type) method.

Definition at line 35 of file histogram.py.

Constructor & Destructor Documentation

def histogram.BufferedWindow.__init__ (   self,
  parent,
  id = wx.ID_ANY,
  style = wx.NO_FULL_REPAINT_ON_RESIZE,
  Map = None,
  kwargs 
)

Definition at line 45 of file histogram.py.

Member Function Documentation

def histogram.BufferedWindow.EraseMap (   self)
def histogram.BufferedWindow.GetImage (   self)
def histogram.BufferedWindow.OnIdle (   self,
  event 
)

Only re-render a histogram image from GRASS during idle time instead of multiple times during resizing.

Definition at line 163 of file histogram.py.

References histogram.BufferedWindow.render, colorrules.BufferedWindow.render, manager.GCPList.render, mapwindow.BufferedWindow.resize, histogram.BufferedWindow.resize, colorrules.BufferedWindow.resize, and histogram.BufferedWindow.UpdateHist().

def histogram.BufferedWindow.OnPaint (   self,
  event 
)

Draw psuedo DC to buffer.

Definition at line 121 of file histogram.py.

References histogram.BufferedWindow._buffer, and mapwindow.BufferedWindow._buffer.

def histogram.BufferedWindow.SaveToFile (   self,
  FileName,
  FileType,
  width,
  height 
)

Field Documentation

histogram.BufferedWindow.dragimg

Definition at line 58 of file histogram.py.

histogram.BufferedWindow.imagedict
histogram.BufferedWindow.img
histogram.BufferedWindow.Map
histogram.BufferedWindow.mapfile

Definition at line 71 of file histogram.py.

Referenced by histogram.BufferedWindow.UpdateHist().

histogram.BufferedWindow.mapname
histogram.BufferedWindow.pdc
histogram.BufferedWindow.pen
histogram.BufferedWindow.resize

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