---
name: "Clutter::Texture"
section: "3pm"
platform: "linux"
package: "libclutter-perl"
version: "1.002-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Clutter::Texture"
---

# Clutter::Texture(3pm)

An actor for displaying and manipulating images

## NAME

Clutter::Texture - An actor for displaying and manipulating images

## HIERARCHY

```
  Glib::Object
  +----Glib::InitiallyUnowned
       +----Clutter::Actor
            +----Clutter::Texture
```

## INTERFACES

```
  Glib::Object::_Unregistered::ClutterScriptable
```

## METHODS

### actor = Clutter::Texture-\>new ($filename=undef)

- •

  `$filename` (string or undef)

### actor = $class-\>new\_from\_actor ($actor)

- •

  `$actor` (Clutter::Actor)

### boolean = $texture-\>set\_area\_from\_rgb\_data ($data, $has\_alpha, $x, $y, $width, $height, $rowstride, $bpp, $flags)

- •

  `$data` (scalar)

- •

  `$has_alpha` (boolean)

- •

  `$x` (integer)

- •

  `$y` (integer)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$rowstride` (integer)

- •

  `$bpp` (integer)

- •

  `$flags` (Clutter::TextureFlags)

May croak with a Glib::Error in $@ on failure.

### (width, height) = $texture-\>get\_base\_size

### handle = $texture-\>get\_cogl\_texture

### $texture-\>set\_cogl\_texture ($tex)

- •

  `$tex` (handle)

### texturequality = $texture-\>get\_filter\_quality

### $texture-\>set\_filter\_quality ($filter\_quality)

- •

  `$filter_quality` (Clutter::TextureQuality)

### boolean = $texture-\>set\_from\_file ($filename)

- •

  `$filename` (string)

May croak with a Glib::Error in $@ on failure.

### boolean = $texture-\>set\_from\_rgb\_data ($data, $has\_alpha, $width, $height, $rowstride, $bpp, $flags)

- •

  `$data` (scalar)

- •

  `$has_alpha` (boolean)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$rowstride` (integer)

- •

  `$bpp` (integer)

- •

  `$flags` (Clutter::TextureFlags)

May croak with a Glib::Error in $@ on failure.

### boolean = $texture-\>set\_from\_yuv\_data ($data, $width, $height, $flags)

- •

  `$data` (scalar)

- •

  `$width` (integer)

- •

  `$height` (integer)

- •

  `$flags` (Clutter::TextureFlags)

May croak with a Glib::Error in $@ on failure.

### integer = $texture-\>get\_max\_tile\_waste

## PROPERTIES

- 'cogl-material' (handle : readable / writable)

  The underlying COGL material handle used to draw this actor

- 'cogl-texture' (handle : readable / writable)

  The underlying COGL texture handle used to draw this actor

- 'disable-slicing' (boolean : readable / writable / construct-only / private)

  Force the underlying texture to be singlularand not made of of smaller space saving inidivual textures.

- 'filename' (string : writable)

  The full path of the file containing the texture

- 'filter-quality' (Clutter::TextureQuality : readable / writable / construct / private)

  Rendering quality used when drawing the texture.

- 'keep-aspect-ratio' (boolean : readable / writable / private)

  Keep the aspect ratio of the texture when requesting the preferred width or height

- 'load-async' (boolean : writable / private)

  Load files inside a thread to avoid blocking when loading images.

- 'load-data-async' (boolean : writable / private)

  Decode image data files inside a thread to reduce blocking when loading images.

- 'pixel-format' (Clutter::Cogl::PixelFormat : readable / private)

  CoglPixelFormat to use.

- 'repeat-x' (boolean : readable / writable / private)

  Repeat underlying pixbuf rather than scale in x direction.

- 'repeat-y' (boolean : readable / writable / private)

  Repeat underlying pixbuf rather than scale in y direction.

- 'sync-size' (boolean : readable / writable / private)

  Auto sync size of actor to underlying pixbuf dimensions

- 'tile-waste' (integer : readable / private)

  Maximum waste area of a sliced texture

## SIGNALS

- **size-change** (Clutter::Texture, integer, integer)

  - **pixbuf-change** (Clutter::Texture)

  - **load-finished** (Clutter::Texture, gpointer)

  ## ENUMS AND FLAGS

### enum Clutter::Cogl::PixelFormat

- •

  'any' / 'COGL\_PIXEL\_FORMAT\_ANY'

- •

  'a-8' / 'COGL\_PIXEL\_FORMAT\_A\_8'

- •

  'rgb-565' / 'COGL\_PIXEL\_FORMAT\_RGB\_565'

- •

  'rgba-4444' / 'COGL\_PIXEL\_FORMAT\_RGBA\_4444'

- •

  'rgba-5551' / 'COGL\_PIXEL\_FORMAT\_RGBA\_5551'

- •

  'yuv' / 'COGL\_PIXEL\_FORMAT\_YUV'

- •

  'g-8' / 'COGL\_PIXEL\_FORMAT\_G\_8'

- •

  'rgb-888' / 'COGL\_PIXEL\_FORMAT\_RGB\_888'

- •

  'bgr-888' / 'COGL\_PIXEL\_FORMAT\_BGR\_888'

- •

  'rgba-8888' / 'COGL\_PIXEL\_FORMAT\_RGBA\_8888'

- •

  'bgra-8888' / 'COGL\_PIXEL\_FORMAT\_BGRA\_8888'

- •

  'argb-8888' / 'COGL\_PIXEL\_FORMAT\_ARGB\_8888'

- •

  'abgr-8888' / 'COGL\_PIXEL\_FORMAT\_ABGR\_8888'

- •

  'rgba-8888-pre' / 'COGL\_PIXEL\_FORMAT\_RGBA\_8888\_PRE'

- •

  'bgra-8888-pre' / 'COGL\_PIXEL\_FORMAT\_BGRA\_8888\_PRE'

- •

  'argb-8888-pre' / 'COGL\_PIXEL\_FORMAT\_ARGB\_8888\_PRE'

- •

  'abgr-8888-pre' / 'COGL\_PIXEL\_FORMAT\_ABGR\_8888\_PRE'

- •

  'rgba-4444-pre' / 'COGL\_PIXEL\_FORMAT\_RGBA\_4444\_PRE'

- •

  'rgba-5551-pre' / 'COGL\_PIXEL\_FORMAT\_RGBA\_5551\_PRE'

### flags Clutter::TextureFlags

- •

  'none' / 'CLUTTER\_TEXTURE\_NONE'

- •

  'rgb-flag-bgr' / 'CLUTTER\_TEXTURE\_RGB\_FLAG\_BGR'

- •

  'rgb-flag-premult' / 'CLUTTER\_TEXTURE\_RGB\_FLAG\_PREMULT'

- •

  'yuv-flag-yuv2' / 'CLUTTER\_TEXTURE\_YUV\_FLAG\_YUV2'

### enum Clutter::TextureQuality

- •

  'low' / 'CLUTTER\_TEXTURE\_QUALITY\_LOW'

- •

  'medium' / 'CLUTTER\_TEXTURE\_QUALITY\_MEDIUM'

- •

  'high' / 'CLUTTER\_TEXTURE\_QUALITY\_HIGH'

## SEE ALSO

Clutter, Glib::Object, Glib::InitiallyUnowned, Clutter::Actor

## COPYRIGHT

Copyright (C) 2006, 2007, 2008  OpenedHand Ltd

Copyright (C) 2009  Intel Corporation

This module is free software; you can redistribute it and/or modify it under the terms of either:

- •

  the GNU Lesser General Public Library version 2.1; or

- •

  the Artistic License, version 2.0.

See Clutter for the full copyright notice.
