Mutter Reference Manual: MetaShapedTexture

## MetaShapedTexture MetaShapedTexture — An actor to draw a masked texture. |

## Functions

ClutterActor * | meta_shaped_texture_new ()
void | meta_shaped_texture_set_create_mipmaps ()
gboolean | meta_shaped_texture_update_area ()
CoglTexture * | meta_shaped_texture_get_texture ()
void | meta_shaped_texture_set_mask_texture ()
cairo_surface_t * | meta_shaped_texture_get_image ()

## Types and Values

struct | MetaShapedTexture
struct | MetaShapedTextureClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── ClutterActor
                ╰── MetaShapedTexture

## Implemented Interfaces

MetaShapedTexture implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and MetaCullable.

## Description

## Functions

### meta_shaped_texture_new ()

    ClutterActor *
    meta_shaped_texture_new (void);

### meta_shaped_texture_set_create_mipmaps ()

    void
    meta_shaped_texture_set_create_mipmaps
                                   (MetaShapedTexture *stex,
                                    gboolean create_mipmaps);

### meta_shaped_texture_update_area ()

    gboolean
    meta_shaped_texture_update_area (MetaShapedTexture *stex,
                                     int x,
                                     int y,
                                     int width,
                                     int height);

Repairs the damaged area indicated by `x` , `y` , `width` and `height` and potentially queues a redraw.

#### Parameters

stex | MetaShapedTexture |
x | the x coordinate of the damaged area |
y | the y coordinate of the damaged area |
width | the width of the damaged area |
height | the height of the damaged area |

#### Returns

Whether a redraw have been queued or not

### meta_shaped_texture_get_texture ()

    CoglTexture *
    meta_shaped_texture_get_texture (MetaShapedTexture *stex);

#### Parameters

stex | The MetaShapedTexture |

#### Returns

the unshaped texture.

[transfer none]

### meta_shaped_texture_set_mask_texture ()

    void
    meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
                                          CoglTexture *mask_texture);

### meta_shaped_texture_get_image ()

    cairo_surface_t *
    meta_shaped_texture_get_image (MetaShapedTexture *stex,
                                   cairo_rectangle_int_t *clip);

Flattens the two layers of the shaped texture into one ARGB32 image by alpha blending the two images, and returns the flattened image.

#### Parameters

stex | A MetaShapedTexture |
clip | A clipping rectangle, to help prevent extra processing. In the case that the clipping rectangle is partially or fully outside the bounds of the texture, the rectangle will be clipped. |

#### Returns

a new cairo surface to be freed with `cairo_surface_destroy()`.

[transfer full]

## Types and Values

### struct MetaShapedTexture

    struct MetaShapedTexture;

The MetaShapedTexture structure contains only private data and should be accessed using the provided API

### struct MetaShapedTextureClass

    struct MetaShapedTextureClass {
    };