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

## Synopsis

                        MetaShapedTexture;
    struct              MetaShapedTextureClass;
    ClutterActor *      meta_shaped_texture_new             (void);
    void                meta_shaped_texture_set_create_mipmaps
                                                            (MetaShapedTexture *stex,
                                                             gboolean create_mipmaps);
    void                meta_shaped_texture_update_area     (MetaShapedTexture *stex,
                                                             int x,
                                                             int y,
                                                             int width,
                                                             int height);
    void                meta_shaped_texture_set_pixmap      (MetaShapedTexture *stex,
                                                             Pixmap pixmap);
    CoglTexture *       meta_shaped_texture_get_texture     (MetaShapedTexture *stex);
    void                meta_shaped_texture_set_mask_texture
                                                            (MetaShapedTexture *stex,
                                                             CoglTexture *mask_texture);
    void                meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
                                                             cairo_region_t *clip_region);
    cairo_surface_t *   meta_shaped_texture_get_image       (MetaShapedTexture *stex,
                                                             cairo_rectangle_int_t *clip);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----MetaShapedTexture

## Implemented Interfaces

MetaShapedTexture implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

## Description

## Details

### MetaShapedTexture

    typedef struct _MetaShapedTexture MetaShapedTexture;

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

### struct MetaShapedTextureClass

    struct MetaShapedTextureClass {
    };

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

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

### meta_shaped_texture_set_pixmap ()

    void                meta_shaped_texture_set_pixmap      (MetaShapedTexture *stex,
                                                             Pixmap pixmap);

`stex` : | The MetaShapedTexture
`pixmap` : | The pixmap you want the stex to assume

### meta_shaped_texture_get_texture ()

    CoglTexture *       meta_shaped_texture_get_texture     (MetaShapedTexture *stex);

`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_set_clip_region ()

    void                meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
                                                             cairo_region_t *clip_region);

Provides a hint to the texture about what areas of the texture are not completely obscured and thus need to be painted. This is an optimization and is not supposed to have any effect on the output.

Typically a parent container will set the clip region before painting its children, and then unset it afterwards.

`stex` : | a MetaShapedTexture
`clip_region` : | the region of the texture that is visible and should be painted. [transfer full]

### 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.

`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]