Package libavg :: Module avg :: Class RasterNode

Class RasterNode




Base class for all nodes that have a direct 2d raster representation. This includes Image, Word, Camera, and Video nodes. RasterNodes can be rotated. Warping of RasterNodes is implemented using a grid of reference points. The position of each of these points can be changed.

Instance Methods
 
getBitmap()
Returns a copy of the bitmap that the node contains.
 
getOrigVertexCoords()
Returns the unwarped coordinate of all vertices as a list of lists.
 
getWarpedVertexCoords()
Returnes the current coordinate of all vertices as a list of lists.
 
setWarpedVertexCoords(grid)
Changes the current coordinates of all vertices.

Inherited from Node: __init__, getParent, getRelPos, releaseEventCapture, setEventCapture, setEventHandler

Inherited from unreachable.instance: __new__

Inherited from object: __delattr__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties
  angle
The angle that the node is rotated to in radians.
  blendmode
The method of compositing the node with the nodes under it.
  maxtileheight
The maximum width and height of the tiles used for warping.
  maxtilewidth
The maximum width and height of the tiles used for warping.
  pivotx
x coordinate of the point that the node is rotated around.
  pivoty
y coordinate of the point that the node is rotated around.

Inherited from Node: active, height, id, opacity, sensitive, width, x, y

Inherited from object: __class__

Method Details

getBitmap()

 
Returns a copy of the bitmap that the node contains.
Returns:
Bitmap

setWarpedVertexCoords(grid)

 
Changes the current coordinates of all vertices.
Parameters:
  • grid - list of lists of coordinate tuples.

Property Details

angle

The angle that the node is rotated to in radians. 0 is unchanged, 3.14 is upside-down.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

blendmode

The method of compositing the node with the nodes under it. Valid values are 'blend', 'add', 'min' and 'max'.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

maxtileheight

The maximum width and height of the tiles used for warping. The effective tile size is also dependent on hardware and driver limits. (ro)
Get Method:
unreachable(...)

maxtilewidth

The maximum width and height of the tiles used for warping. The effective tile size is also dependent on hardware and driver limits. (ro)
Get Method:
unreachable(...)

pivotx

x coordinate of the point that the node is rotated around. Default is the center of the node.
Get Method:
unreachable(...)
Set Method:
unreachable(...)

pivoty

y coordinate of the point that the node is rotated around. Default is the center of the node.
Get Method:
unreachable(...)
Set Method:
unreachable(...)