GRASS Programmer's Manual  6.4.4(2014)-r
wxnviz.Texture Class Reference

Class representing OpenGL texture. More...

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

Public Member Functions

def __init__ (self, filepath, overlayId, coords)
 Load image to texture. More...
 
def __del__ (self)
 Delete texture. More...
 
def Resize (self)
 Resize image to match 2^n. More...
 
def Load (self)
 Load image to texture. More...
 
def Draw (self)
 Draw texture as an image. More...
 
def SetBounds (self, rect)
 Set Bounding Rectangle. More...
 
def HitTest (self, x, y, radius)
 
def MoveTexture (self, dx, dy)
 Move texture on the screen. More...
 
def SetCoords (self, coords)
 Set coordinates. More...
 
def GetId (self)
 Returns image id. More...
 
def SetActive
 
def IsActive (self)
 

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 overlays.OverlayController.coords, and 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 overlays.OverlayController.coords, 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: