Cogl.SubTexture¶
- Subclasses:
None
Methods¶
- Inherited:
class |
|
|
Virtual Methods¶
None
Fields¶
None
Class Details¶
- class Cogl.SubTexture¶
- Bases:
- Abstract:
No
- classmethod new(ctx, parent_texture, sub_x, sub_y, sub_width, sub_height)¶
- Parameters:
ctx (
Cogl.Context
) – ACogl.Context
pointerparent_texture (
Cogl.Texture
) – The full texture containing a sub-region you want to make aCogl.SubTexture
from.sub_x (
int
) – The top-left x coordinate of the parent region to make a texture from.sub_y (
int
) – The top-left y coordinate of the parent region to make a texture from.sub_width (
int
) – The width of the parent region to make a texture from.sub_height (
int
) – The height of the parent region to make a texture from.
- Returns:
A newly allocated
Cogl.SubTexture
representing a sub-region of parent_texture.- Return type:
Creates a high-level
Cogl.SubTexture
representing a sub-region of any otherCogl.Texture
. The sub-region must strictly lye within the bounds of the parent_texture. The returned texture implements the #CoglMetaTexture interface because it’s not a low level texture that hardware can understand natively.Remember: Unless you are using high level drawing APIs such as cogl_rectangle() or other APIs documented to understand the #CoglMetaTexture interface then you need to use the #CoglMetaTexture interface to resolve a
Cogl.SubTexture
into a low-level texture before drawing.New in version 1.10.
- get_parent()¶
- Returns:
The parent texture that self derives its content from.
- Return type:
Retrieves the parent texture that self derives its content from. This is the texture that was passed to
Cogl.SubTexture.new
() as the parent_texture argument.New in version 1.10.