clutter.Texture

clutter.Texture — An actor for displaying and manipulating images

Synopsis

class clutter.Texture(clutter.Actor):
    clutter.Texture(pixbuf=None)
def get_pixbuf()
def set_pixbuf(pixbuf=None)

Ancestry

gobject.GObject
 +--gobject.GInitiallyUnowned
     +--clutter.Actor
         +--clutter.Texture
  

Properties

clutter.Actor Properties

"pixbuf"Read-Writegdk.Pixbuf source for the texture.
"tiled"Read-Write-Construct OnlyEnables the use of tiled GL texture to use the texture memory more efficiently.
"sync-size"Read-WriteAuto sync size of actor to underlying pixbuf dimensions
"repeat-x"Read-WriteRepeat the underlying pixbuf on the X axis rather than scale it. Currently ignored.
"repeat-y"Read-WriteRepeat the underlying pixbuf on the Y axis rather than scale it. Currently ignored.

Signal Prototypes

clutter.Actor Signal Prototypes

"size-change" def callback(texture, width, height, user_param1, ...)
"pixbuf-change" def callback(texture, user_param1, ...)

Description

clutter.Texture is a base class for displaying and manipulating pixel buffer type data.

The set_from_rgb_data() and set_pixbuf() methods are used to copy image data into texture memory and subsequently realize the texture.

If texture reads are supported by underlying GL implementation unrealizing/hiding frees image data from texture memory moving to main system memory. Re-realizing then performs the opposite operation. This process allows basic management of commonly limited available texture memory.

Note

a ClutterTexture will scale its contents to fit the bounding box requested using request_coords() and its wrappers. To display an area of a texture without scaling, you should set the clip area using set_clip().

Constructor

    clutter.Texture(pixbuf=None)
pixbuf :The pixbuf to be displayed by the texture, or None.
Returns :a new clutter.Texture.

Creates a new clutter.Texture object.

Methods

Signals

The "size-change" clutter.Texture Signal

    def callback(texture, width, height, user_param1, ...)
texture :the texture that received the signal
width :the new width of the source data
height :the new height of the source data
user_param1 :the first user parameter (if any) specified with the connect() method
... :additional user parameters (if any)

The "size-change" signal is emitted each time the size of the pixbuf used by @texture changes. The new size is given as argument to the callback.

The "pixbuf-change" clutter.Texture Signal

    def callback(texture, user_param1, ...)
texture :the texture that received the signal
user_param1 :the first user parameter (if any) specified with the connect() method
... :additional user parameters (if any)

The "pixbuf-change" signal is emitted each time the pixbuf used by the clutter.Texture changes.