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
Bitmap
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 unreachable.instance: __new__

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

    Inherited from AreaNode
AreaNode
getElementByPos(pos)
Returns the topmost child node that is at the position given.
mediasize
getMediaSize()
Returns the size in pixels of the media in the node.
    Inherited from Node
 
__eq__(...)
 
__hash__(...)
hash(x)
 
__init__(...)
Raises an exception This class cannot be instantiated from Python
 
__ne__(...)
abspos
getAbsPos(relpos)
Transforms a position in coordinates relative to the node to a position in window coordinates.
node
getParent()
Returns the container (AVGNode or DivNode) the node is in.
relpos
getRelPos(abspos)
Transforms a position in window coordinates to a position in coordinates relative to the node.
 
releaseEventCapture(cursorid)
Restores normal mouse operation after a call to setEventCapture().
 
setEventCapture(cursorid)
Sets up event capturing so that cursor events are sent to this node regardless of the cursor position.
 
setEventHandler(type, source, pyfunc)
Sets a callback function that is invoked whenever an event of the specified type from the specified source occurs.
None
unlink(kill)
Removes a node from it's parent container.
Properties
  blendmode
The method of compositing the node with the nodes under it.
  maskhref
The source filename for a mask image to be used as alpha channel.
  maskpos
An offset for the mask image.
  masksize
The size of the mask image.
  maxtileheight
The maximum width and height of the tiles used for warping.
  maxtilewidth
The maximum width and height of the tiles used for warping.
  mipmap
Determines whether mipmaps are generated for this node.

Inherited from object: __class__

    Inherited from AreaNode
  angle
The angle that the node is rotated to in radians.
  height
  pivot
The position of the point that the node is rotated around.
  pivotx
Deprecated.
  pivoty
Deprecated.
  pos
The position of the node's top left corner relative to it's parent node.
  size
  width
  x
The position of the node's left edge relative to it's parent node.
  y
The position of the node's top edge relative to it's parent node.
    Inherited from Node
  active
If this attribute is true, the node behaves as usual.
  id
A unique identifier that can be used to reference the node.
  opacity
A measure of the node's transparency.
  sensitive
A node only reacts to events if sensitive is true.
Method Details

setWarpedVertexCoords(grid)

 

Changes the current coordinates of all vertices.

Parameters:
  • grid - list of lists of coordinate tuples.

Property Details

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(...)

maskhref

The source filename for a mask image to be used as alpha channel. Where this file is white, the node is shown. Where it is black, the node is transparent. If the node is an image with an alpha channel, the alpha channel is replaced by the mask.

Get Method:
unreachable(...)
Set Method:
unreachable(...)

maskpos

An offset for the mask image. For images and videos, the offset is given in image or video pixels, respectively. For words nodes, the offset is given in screen pixels. If portions of the node extend outside the mask, the border pixels of the mask are taken.

Get Method:
unreachable(...)
Set Method:
unreachable(...)

masksize

The size of the mask image. For images and videos, the size is given in image or video pixels, respectively. For words nodes, the size is given in screen pixels. If portions of the node extend outside the mask, the border pixels of the mask are taken.

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(...)

mipmap

Determines whether mipmaps are generated for this node. Setting this to True improves the quality of minified nodes, but causes a performance hit for every image change. (ro)

Get Method:
unreachable(...)