
@c %start of fragment

@deffn Function clutter-texture-new  @result{}@tie{} (ret@tie{}@code{<clutter-actor>})
Creates a new empty @code{<clutter-texture>} object.

@table @var
@item ret
A newly created @code{<clutter-texture>} object.

@end table

@end deffn

@deffn Function clutter-texture-new-from-file  (filename@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{<clutter-actor>})
Creates a new ClutterTexture actor to display the image contained a
file. If the image failed to load then NULL is returned and @var{error}
is set.

@table @var
@item filename
The name of an image file to load.

@item error
Return locatoin for an error.

@item ret
A newly created @code{<clutter-texture>} object or NULL on error.

@end table

Since 0.8

@end deffn

@deffn Function clutter-texture-set-from-file  (self@tie{}@code{<clutter-texture>}) (filename@tie{}@code{mchars}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method set-from-file
Sets the @code{<clutter-texture>} image data from an image file. In case
of failure, @samp{@code{#f}} is returned and @var{error} is set.

If @code{<"load-async">} is set to @samp{@code{#t}}, this function will
return as soon as possible, and the actual image loading from disk will
be performed asynchronously. @code{<"size-change">} will be emitten when
the size of the texture is available and @code{<"load-finished">} will
be emitted when the image has been loaded or if an error occurred.

@table @var
@item texture
A @code{<clutter-texture>}

@item filename
The filename of the image in GLib file name encoding

@item error
Return location for a @code{<g-error>}, or @samp{@code{#f}}

@item ret
@samp{@code{#t}} if the image was successfully loaded and set

@end table

Since 0.8

@end deffn

@deffn Function clutter-texture-get-base-size  (self@tie{}@code{<clutter-texture>}) @result{}@tie{} (width@tie{}@code{int}) (height@tie{}@code{int})
@deffnx Method get-base-size
Gets the size in pixels of the untransformed underlying image

@table @var
@item texture
a @code{<clutter-texture>}

@item width
return location for the width, or @samp{@code{#f}}.

@item height
return location for the height, or @samp{@code{#f}}.

@end table

@end deffn

@deffn Function clutter-texture-get-max-tile-waste  (self@tie{}@code{<clutter-texture>}) @result{}@tie{} (ret@tie{}@code{int})
@deffnx Method get-max-tile-waste
Gets the maximum waste that will be used when creating a texture or -1
if slicing is disabled.

@table @var
@item texture
A @code{<clutter-texture>}

@item ret
The maximum waste or -1 if the texture waste is unlimited.

@end table

Since 0.8

@end deffn

@deffn Function clutter-texture-set-filter-quality  (self@tie{}@code{<clutter-texture>}) (filter_quality@tie{}@code{<clutter-texture-quality>})
@deffnx Method set-filter-quality
Sets the filter quality when scaling a texture. The quality is an
enumeration currently the following values are supported:
@samp{CLUTTER_TEXTURE_QUALITY_LOW} which is fast but only uses nearest
neighbour interpolation. @samp{CLUTTER_TEXTURE_QUALITY_MEDIUM} which is
computationally a bit more expensive (bilinear interpolation), and
@samp{CLUTTER_TEXTURE_QUALITY_HIGH} which uses extra texture memory
resources to improve scaled down rendering as well (by using mipmaps).
The default value is @samp{CLUTTER_TEXTURE_QUALITY_MEDIUM}.

@table @var
@item texture
a @code{<clutter-texture>}

@item filter-quality
new filter quality value

@end table

Since 0.8

@end deffn

@deffn Function clutter-texture-get-sync-size  (self@tie{}@code{<clutter-texture>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-sync-size
Retrieves the value set with @code{clutter-texture-set-sync-size}

@table @var
@item texture
a @code{<clutter-texture>}

@item ret
@samp{@code{#t}} if the @code{<clutter-texture>} should have the same
preferred size of the underlying image data

@end table

Since 1.0

@end deffn

@deffn Function clutter-texture-set-sync-size  (self@tie{}@code{<clutter-texture>}) (sync_size@tie{}@code{bool})
@deffnx Method set-sync-size
Sets whether @var{texture} should have the same preferred size as the
underlying image data.

@table @var
@item texture
a @code{<clutter-texture>}

@item sync-size
@samp{@code{#t}} if the texture should have the same size of the
underlying image data

@end table

Since 1.0

@end deffn

@deffn Function clutter-texture-get-repeat  (self@tie{}@code{<clutter-texture>}) @result{}@tie{} (repeat_x@tie{}@code{bool}) (repeat_y@tie{}@code{bool})
@deffnx Method get-repeat
Retrieves the horizontal and vertical repeat values set using
@code{clutter-texture-set-repeat}

@table @var
@item texture
a @code{<clutter-texture>}

@item repeat-x
return location for the horizontal repeat.

@item repeat-y
return location for the vertical repeat.

@end table

Since 1.0

@end deffn

@deffn Function clutter-texture-set-repeat  (self@tie{}@code{<clutter-texture>}) (repeat_x@tie{}@code{bool}) (repeat_y@tie{}@code{bool})
@deffnx Method set-repeat
Sets whether the @var{texture} should repeat horizontally or vertically
when the actor size is bigger than the image size

@table @var
@item texture
a @code{<clutter-texture>}

@item repeat-x
@samp{@code{#t}} if the texture should repeat horizontally

@item repeat-y
@samp{@code{#t}} if the texture should repeat vertically

@end table

Since 1.0

@end deffn

@deffn Function clutter-texture-get-load-async  (self@tie{}@code{<clutter-texture>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-load-async
Retrieves the value set using @code{clutter-texture-set-load-async}

@table @var
@item texture
a @code{<clutter-texture>}

@item ret
@samp{@code{#t}} if the @code{<clutter-texture>} should load the data
from disk asynchronously

@end table

Since 1.0

@end deffn

@deffn Function clutter-texture-set-load-async  (self@tie{}@code{<clutter-texture>}) (load_async@tie{}@code{bool})
@deffnx Method set-load-async
Sets whether @var{texture} should use a worker thread to load the data
from disk asynchronously. Setting @var{load-async} to @samp{@code{#t}}
will make @code{clutter-texture-set-from-file} return immediately.

See the @code{<"load-async">} property documentation, and
@code{clutter-texture-set-load-data-async}.

@table @var
@item texture
a @code{<clutter-texture>}

@item load-async
@samp{@code{#t}} if the texture should asynchronously load data from a
filename

@end table

Since 1.0

@end deffn

@deffn Function clutter-texture-get-load-data-async  (self@tie{}@code{<clutter-texture>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-load-data-async
Retrieves the value set by @code{clutter-texture-set-load-data-async}

@table @var
@item texture
a @code{<clutter-texture>}

@item ret
@samp{@code{#t}} if the @code{<clutter-texture>} should load the image
data from a file asynchronously

@end table

Since 1.0

@end deffn

@deffn Function clutter-texture-set-load-data-async  (self@tie{}@code{<clutter-texture>}) (load_async@tie{}@code{bool})
@deffnx Method set-load-data-async
Sets whether @var{texture} should use a worker thread to load the data
from disk asynchronously. Setting @var{load-async} to @samp{@code{#t}}
will make @code{clutter-texture-set-from-file} block until the
@code{<clutter-texture>} has determined the width and height of the
image data.

See the @code{<"load-async">} property documentation, and
@code{clutter-texture-set-load-async}.

@table @var
@item texture
a @code{<clutter-texture>}

@item load-async
@samp{@code{#t}} if the texture should asynchronously load data from a
filename

@end table

Since 1.0

@end deffn

@deffn Function clutter-texture-get-pick-with-alpha  (self@tie{}@code{<clutter-texture>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method get-pick-with-alpha
Retrieves the value set by @code{clutter-texture-set-load-data-async}

@table @var
@item texture
a @code{<clutter-texture>}

@item ret
@samp{@code{#t}} if the @code{<clutter-texture>} should define its shape
using the alpha channel when picking.

@end table

Since 1.4

@end deffn

@deffn Function clutter-texture-set-pick-with-alpha  (self@tie{}@code{<clutter-texture>}) (pick_with_alpha@tie{}@code{bool})
@deffnx Method set-pick-with-alpha
Sets whether @var{texture} should have it's shape defined by the alpha
channel when picking.

Be aware that this is a bit more costly than the default picking due to
the texture lookup, extra test against the alpha value and the fact that
it will also interrupt the batching of geometry done internally.

Also there is currently no control over the threshold used to determine
what value of alpha is considered pickable, and so only fully opaque
parts of the texture will react to picking.

@table @var
@item texture
a @code{<clutter-texture>}

@item pick-with-alpha
@samp{@code{#t}} if the alpha channel should affect the picking shape

@end table

Since 1.4

@end deffn


@c %end of fragment
