GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 1896 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 1898 of file wxnviz.py.

def wxnviz.Texture.__del__ (   self)

Delete texture.

Definition at line 1931 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 1987 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 2011 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 1992 of file wxnviz.py.

References wxnviz.Texture.coords.

Referenced by wxnviz.Texture.SetCoords().

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

Definition at line 2008 of file wxnviz.py.

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

def wxnviz.Texture.SetBounds (   self,
  rect 
)

Set Bounding Rectangle.

Definition at line 1983 of file wxnviz.py.

References wxnviz.Texture.bounds.

def wxnviz.Texture.SetCoords (   self,
  coords 
)

Set coordinates.

Definition at line 1998 of file wxnviz.py.

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

Field Documentation

wxnviz.Texture.active

Definition at line 1912 of file wxnviz.py.

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

wxnviz.Texture.bounds

Definition at line 1911 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 1906 of file wxnviz.py.

wxnviz.Texture.maxSize

Definition at line 1924 of file wxnviz.py.

wxnviz.Texture.path

Definition at line 1905 of file wxnviz.py.

Referenced by wxnviz.Texture.__del__().

wxnviz.Texture.textureId

Definition at line 1927 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: