Clutter.OffscreenEffect

g Clutter.ActorMeta Clutter.ActorMeta Clutter.Effect Clutter.Effect Clutter.ActorMeta->Clutter.Effect Clutter.OffscreenEffect Clutter.OffscreenEffect Clutter.Effect->Clutter.OffscreenEffect GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.ActorMeta GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:Clutter.BlurEffect, Clutter.BrightnessContrastEffect, Clutter.ColorizeEffect, Clutter.DeformEffect, Clutter.DesaturateEffect, Clutter.ShaderEffect

Properties

Inherited:Clutter.ActorMeta (3)

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent_instance Clutter.Effect r  

Class Details

class Clutter.OffscreenEffect(**kwargs)
Bases:Clutter.Effect
Abstract:Yes
Structure:Clutter.OffscreenEffectClass

The Clutter.OffscreenEffect structure contains only private data and should be accessed using the provided API

New in version 1.4.

create_texture(width, height)
Parameters:
  • width (float) – the minimum width of the target texture
  • height (float) – the minimum height of the target texture
Returns:

a handle to a Cogl texture, or %COGL_INVALID_HANDLE. The returned handle has its reference count increased.

Return type:

object

Calls the create_texture() virtual function of the self

New in version 1.4.

get_target()
Returns:a Cogl.Material or None. The returned material is owned by Clutter and it should not be modified or freed
Return type:Cogl.Material

Retrieves the material used as a render target for the offscreen buffer created by self

You should only use the returned Cogl.Material when painting. The returned material might change between different frames.

New in version 1.4.

get_target_rect()
Returns:True if the offscreen buffer has a valid rectangle, and False otherwise
rect:return location for the target area
Return type:(bool, rect: Clutter.Rect)

Retrieves the origin and size of the offscreen buffer used by self to paint the actor to which it has been applied.

This function should only be called by Clutter.OffscreenEffect implementations, from within the Clutter.OffscreenEffect.do_paint_target() virtual function.

New in version 1.14.

get_target_size()
Returns:True if the offscreen buffer has a valid size, and False otherwise
width:return location for the target width, or None
height:return location for the target height, or None
Return type:(bool, width: float, height: float)

Retrieves the size of the offscreen buffer used by self to paint the actor to which it has been applied.

This function should only be called by Clutter.OffscreenEffect implementations, from within the Clutter.OffscreenEffect.do_paint_target() virtual function.

New in version 1.8.

Deprecated since version 1.14: Use Clutter.OffscreenEffect.get_target_rect() instead

get_texture()
Returns:a #CoglHandle or %COGL_INVALID_HANDLE. The returned texture is owned by Clutter and it should not be modified or freed
Return type:object

Retrieves the texture used as a render target for the offscreen buffer created by self

You should only use the returned texture when painting. The texture may change after ClutterEffect::pre_paint is called so the effect implementation should update any references to the texture after chaining-up to the parent’s pre_paint implementation. This can be used instead of Clutter.OffscreenEffect.get_target() when the effect subclass wants to paint using its own material.

New in version 1.10.

paint_target()

Calls the paint_target() virtual function of the self

New in version 1.4.

do_create_texture(width, height) virtual
Parameters:
  • width (float) – the minimum width of the target texture
  • height (float) – the minimum height of the target texture
Returns:

a handle to a Cogl texture, or %COGL_INVALID_HANDLE. The returned handle has its reference count increased.

Return type:

object

Calls the create_texture() virtual function of the effect

New in version 1.4.

do_paint_target() virtual

Calls the paint_target() virtual function of the effect

New in version 1.4.