GRASS Programmer's Manual  6.4.3(2013)-r
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
wxnviz.Texture Class Reference

Class representing OpenGL texture. More...

Inheritance diagram for wxnviz.Texture:
Collaboration diagram for wxnviz.Texture:

Public Member Functions

def __init__
 Load image to texture. More...
 
def __del__
 Delete texture. More...
 
def Resize
 Resize image to match 2^n. More...
 
def Load
 Load image to texture. More...
 
def Draw
 Draw texture as an image. More...
 
def SetBounds
 Set Bounding Rectangle. More...
 
def HitTest
 
def MoveTexture
 Move texture on the screen. More...
 
def SetCoords
 Set coordinates. More...
 
def GetId
 Returns image id. More...
 
def SetActive
 
def IsActive
 

Data Fields

 path
 
 image
 
 width
 
 height
 
 id
 
 coords
 
 bounds
 
 active
 
 maxSize
 
 textureId
 

Detailed Description

Class representing OpenGL texture.

Definition at line 1881 of file wxnviz.py.

Constructor & Destructor Documentation

def wxnviz.Texture.__init__ (   self,
  filepath,
  overlayId,
  coords 
)

Load image to texture.

Parameters
filepathpath to image file
overlayIdid of overlay (1 for legend, 101 and more for text)
coordsimage coordinates

Definition at line 1883 of file wxnviz.py.

def wxnviz.Texture.__del__ (   self)

Delete texture.

Definition at line 1916 of file wxnviz.py.

References Nviz_del_texture(), wxnviz.Texture.path, and wxnviz.Texture.textureId.

Member Function Documentation

def wxnviz.Texture.GetId (   self)
def wxnviz.Texture.HitTest (   self,
  x,
  y,
  radius 
)

Definition at line 1972 of file wxnviz.py.

References wxnviz.Texture.bounds.

Referenced by layertree.LayerTree.OnEndDrag(), and layertree.LayerTree.OnMotion().

def wxnviz.Texture.IsActive (   self)

Definition at line 1996 of file wxnviz.py.

References render.Layer.active, and wxnviz.Texture.active.

def wxnviz.Texture.MoveTexture (   self,
  dx,
  dy 
)

Move texture on the screen.

Definition at line 1977 of file wxnviz.py.

References overlays.OverlayController.coords, and wxnviz.Texture.coords.

Referenced by wxnviz.Texture.SetCoords().

def wxnviz.Texture.SetActive (   self,
  active = True 
)

Definition at line 1993 of file wxnviz.py.

References render.Layer.active, and wxnviz.Texture.active.

def wxnviz.Texture.SetBounds (   self,
  rect 
)

Set Bounding Rectangle.

Definition at line 1968 of file wxnviz.py.

References wxnviz.Texture.bounds.

def wxnviz.Texture.SetCoords (   self,
  coords 
)

Set coordinates.

Definition at line 1983 of file wxnviz.py.

References overlays.OverlayController.coords, wxnviz.Texture.coords, and wxnviz.Texture.MoveTexture().

Field Documentation

wxnviz.Texture.active

Definition at line 1897 of file wxnviz.py.

Referenced by wxnviz.Texture.IsActive(), and wxnviz.Texture.SetActive().

wxnviz.Texture.bounds

Definition at line 1896 of file wxnviz.py.

Referenced by wxnviz.Texture.HitTest(), and wxnviz.Texture.SetBounds().

wxnviz.Texture.coords
wxnviz.Texture.height
wxnviz.Texture.image

Definition at line 1891 of file wxnviz.py.

wxnviz.Texture.maxSize

Definition at line 1909 of file wxnviz.py.

wxnviz.Texture.path

Definition at line 1890 of file wxnviz.py.

Referenced by wxnviz.Texture.__del__().

wxnviz.Texture.textureId

Definition at line 1912 of file wxnviz.py.

Referenced by wxnviz.Texture.__del__(), and wxnviz.Texture.Draw().

wxnviz.Texture.width

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