Class: Clutter::Texture

Inherits:
Actor
  • Object
show all
Defined in:
(unknown)

Overview

The Clutter::TextureClass structure contains only private data

Direct Known Subclasses

CairoTexture

Instance Method Summary collapse

Methods inherited from Actor

#accessible, #actions, #actions=, #add_action, #add_action_with_name, #add_child, #add_constraint, #add_constraint_with_name, #add_effect, #add_effect_with_name, #add_transition, #allocate, #allocate_align_fill, #allocate_available_size, #allocate_preferred_size, #allocation, #allocation=, #anchor_gravity, #anchor_gravity=, #anchor_point_from_gravity=, #anchor_point_gravity, #anchor_x, #anchor_x=, #anchor_y, #anchor_y=, #animate, #animate_with_alpha, #animate_with_alphav, #animate_with_timeline, #animate_with_timelinev, #animatev, #animation, #apply_relative_transform_to_point, #apply_transform_to_point, #background_color, #background_color=, #background_color_set=, #background_color_set?, #bind_model, #bind_model_with_properties, #child_transform, #child_transform=, #child_transform_set=, #child_transform_set?, #children, #clear_actions, #clear_constraints, #clear_effects, #clip, #clip=, #clip_rect, #clip_rect=, #clip_to_allocation, #clip_to_allocation=, #clip_to_allocation?, #constraints, #constraints=, #contains, #content, #content=, #content_box, #content_box=, #content_gravity, #content_gravity=, #content_repeat, #content_repeat=, #continue_paint, #create_pango_context, #create_pango_layout, #default_paint_volume, #depth, #depth=, #destroy, #destroy_all_children, #detach_animation, #easing_delay, #easing_delay=, #easing_duration, #easing_duration=, #easing_mode, #easing_mode=, #effect=, #effects, #event, #first_child, #first_child=, #fixed_position_set, #fixed_position_set=, #fixed_position_set?, #fixed_x, #fixed_x=, #fixed_y, #fixed_y=, #flags, #flags=, #geometry=, #get_abs_allocation_vertices, #get_action, #get_allocation_box, #get_allocation_geometry, #get_allocation_vertices, #get_anchor_point, #get_background_color, #get_child_at_index, #get_child_transform, #get_clip, #get_constraint, #get_content_box, #get_content_scaling_filters, #get_effect, #get_geometry, #get_margin, #get_paint_box, #get_pivot_point, #get_position, #get_preferred_height, #get_preferred_size, #get_preferred_width, #get_rotation, #get_rotation_angle, #get_scale, #get_scale_center, #get_size, #get_transform, #get_transformation_matrix, #get_transformed_paint_volume, #get_transformed_position, #get_transformed_size, #get_transition, #get_translation, #gid, #grab_key_focus, #has_actions, #has_allocation, #has_clip, #has_clip=, #has_clip?, #has_constraints, #has_effects, #has_key_focus, #has_overlaps, #has_pointer, #has_pointer=, #has_pointer?, #height, #height=, #hide, #hide_all, #insert_child_above, #insert_child_at_index, #insert_child_below, #is_in_clone_paint, #is_mapped, #is_realized, #is_rotated, #is_scaled, #is_visible, #last_child, #last_child=, #layout_manager, #layout_manager=, #lower, #lower_bottom, #magnification_filter, #magnification_filter=, #map, #mapped=, #mapped?, #margin=, #margin_bottom, #margin_bottom=, #margin_left, #margin_left=, #margin_right, #margin_right=, #margin_top, #margin_top=, #min_height, #min_height=, #min_height_set=, #min_height_set?, #min_width, #min_width=, #min_width_set=, #min_width_set?, #minification_filter, #minification_filter=, #move_anchor_point, #move_anchor_point_from_gravity, #move_by, #n_children, #name, #name=, #natural_height, #natural_height=, #natural_height_set=, #natural_height_set?, #natural_width, #natural_width=, #natural_width_set=, #natural_width_set?, #needs_expand, #next_sibling, #offscreen_redirect, #offscreen_redirect=, #opacity, #opacity=, #paint, #paint_opacity, #paint_visibility, #paint_volume, #pango_context, #parent, #parent=, #pivot_point, #pivot_point=, #pivot_point_z, #pivot_point_z=, #pop_internal, #position, #position=, #previous_sibling, #push_internal, #queue_redraw, #queue_redraw_with_clip, #queue_relayout, #raise, #raise_top, #reactive, #reactive=, #reactive?, #realize, #realized=, #realized?, #remove_action, #remove_action_by_name, #remove_all_children, #remove_all_transitions, #remove_child, #remove_clip, #remove_constraint, #remove_constraint_by_name, #remove_effect, #remove_effect_by_name, #remove_transition, #reparent, #replace_child, #request_mode, #request_mode=, #restore_easing_state, #rotation_angle_x, #rotation_angle_x=, #rotation_angle_y, #rotation_angle_y=, #rotation_angle_z, #rotation_angle_z=, #rotation_center_x, #rotation_center_x=, #rotation_center_y, #rotation_center_y=, #rotation_center_z, #rotation_center_z=, #rotation_center_z_gravity, #rotation_center_z_gravity=, #save_easing_state, #save_easing_state_without_block, #scale_center_x, #scale_center_x=, #scale_center_y, #scale_center_y=, #scale_gravity, #scale_gravity=, #scale_x, #scale_x=, #scale_y, #scale_y=, #scale_z, #scale_z=, #set_allocation, #set_anchor_point, #set_child_above_sibling, #set_child_at_index, #set_child_below_sibling, #set_clip, #set_content_scaling_filters, #set_pivot_point, #set_position, #set_rotation, #set_rotation_angle, #set_scale, #set_scale_full, #set_scale_with_gravity, #set_shader_param, #set_shader_param_float, #set_shader_param_int, #set_size, #set_translation, #set_z_rotation_from_gravity, #shader, #shader=, #should_pick_paint, #show, #show_all, #show_on_set_parent=, #show_on_set_parent?, #size, #size=, #stage, #text_direction, #text_direction=, #transform, #transform=, #transform_set=, #transform_set?, #transform_stage_point, #translation_x, #translation_x=, #translation_y, #translation_y=, #translation_z, #translation_z=, #unmap, #unparent, #unrealize, #unset_flags, #visible=, #visible?, #width, #width=, #x, #x=, #x_align, #x_align=, #x_expand, #x_expand=, #x_expand?, #y, #y=, #y_align, #y_align=, #y_expand, #y_expand=, #y_expand?, #z_position, #z_position=, #z_rotation_gravity

Constructor Details

#initialize(filename) ⇒ 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 error is set. error.

Parameters:

  • filename (String)

    The name of an image file to load.

Instance Method Details

#cogl_materialClutter::

Returns cogl-material.

Returns:

#cogl_material=(cogl_material) ⇒ Clutter::

Parameters:

Returns:

#cogl_textureClutter::

Returns cogl-texture.

Returns:

#cogl_texture=(cogl_texture) ⇒ Clutter::

Parameters:

Returns:

#disable_slicing=(disable_slicing) ⇒ Boolean

Parameters:

  • disable_slicing (Boolean)

Returns:

  • (Boolean)

    disable-slicing

  • (Boolean)

    disable-slicing

#disable_slicing?Boolean

Returns disable-slicing.

Returns:

  • (Boolean)

    disable-slicing

#filenameString

The path of the file containing the image data to be displayed by the texture.

This property is unset when using the clutter_texture_set_from_*_data() family of functions.

Returns:

  • (String)

    filename

#filename=(filename) ⇒ String

The path of the file containing the image data to be displayed by the texture.

This property is unset when using the clutter_texture_set_from_*_data() family of functions.

Parameters:

  • filename (String)

Returns:

  • (String)

    filename

  • (String)

    filename

#filter_qualityClutter::TextureQuality

Returns filter-quality.

Returns:

#filter_quality=(filter_quality) ⇒ Clutter::TextureQuality

Parameters:

Returns:

#from_file=(filename) ⇒ Boolean

Sets the Clutter::Texture image data from an image file. In case of failure, false is returned and error is set.

If Clutter::Texture:load-async is set to true, this function will return as soon as possible, and the actual image loading from disk will be performed asynchronously. Clutter::Texture::size-change will be emitten when the size of the texture is available and Clutter::Texture::load-finished will be emitted when the image has been loaded or if an error occurred.

Parameters:

  • filename (String)

    The filename of the image in GLib file name encoding

Returns:

  • (Boolean)

    true if the image was successfully loaded and set

#get_base_size(width, height) ⇒ nil

Gets the size in pixels of the untransformed underlying image

Parameters:

  • width (Integer)

    return location for the width, or nil

  • height (Integer)

    return location for the height, or nil

Returns:

  • (nil)

#get_repeat(repeat_x, repeat_y) ⇒ nil

Retrieves the horizontal and vertical repeat values set using clutter_texture_set_repeat()

Parameters:

  • repeat_x (Boolean)

    return location for the horizontal repeat

  • repeat_y (Boolean)

    return location for the vertical repeat

Returns:

  • (nil)

#keep_aspect_ratioBoolean

Retrieves the value set using clutter_texture_set_keep_aspect_ratio()

Returns:

  • (Boolean)

    true if the Clutter::Texture should maintain the aspect ratio of the underlying image

#keep_aspect_ratio=(keep_aspect_ratio) ⇒ Boolean

Parameters:

  • keep_aspect_ratio (Boolean)

Returns:

  • (Boolean)

    keep-aspect-ratio

  • (Boolean)

    keep-aspect-ratio

#keep_aspect_ratio?Boolean

Returns keep-aspect-ratio.

Returns:

  • (Boolean)

    keep-aspect-ratio

#load_asyncBoolean

Retrieves the value set using clutter_texture_set_load_async()

Returns:

  • (Boolean)

    true if the Clutter::Texture should load the data from disk asynchronously

#load_async=(load_async) ⇒ Boolean

Tries to load a texture from a filename by using a local thread to perform the read operations. The initially created texture has dimensions 0x0 when the true size becomes available the Clutter::Texture::size-change signal is emitted and when the image has completed loading the Clutter::Texture::load-finished signal is emitted.

Threading is only enabled if g_thread_init() has been called prior to clutter_init(), otherwise Clutter::Texture will use the main loop to load the image.

The upload of the texture data on the GL pipeline is not asynchronous, as it must be performed from within the same thread that called clutter_main().

Parameters:

  • load_async (Boolean)

Returns:

  • (Boolean)

    load-async

#load_data_asyncBoolean

Retrieves the value set by clutter_texture_set_load_data_async()

Returns:

  • (Boolean)

    true if the Clutter::Texture should load the image data from a file asynchronously

#load_data_async=(load_data_async) ⇒ Boolean

Like Clutter::Texture:load-async but loads the width and height synchronously causing some blocking.

Parameters:

  • load_data_async (Boolean)

Returns:

  • (Boolean)

    load-data-async

#max_tile_wasteInteger

Gets the maximum waste that will be used when creating a texture or -1 if slicing is disabled.

Returns:

  • (Integer)

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

#pick_with_alphaBoolean

Retrieves the value set by clutter_texture_set_load_data_async() using the alpha channel when picking.

Returns:

  • (Boolean)

    true if the Clutter::Texture should define its shape

#pick_with_alpha=(pick_with_alpha) ⇒ Boolean

Parameters:

  • pick_with_alpha (Boolean)

Returns:

  • (Boolean)

    pick-with-alpha

  • (Boolean)

    pick-with-alpha

#pick_with_alpha?Boolean

Returns pick-with-alpha.

Returns:

  • (Boolean)

    pick-with-alpha

#pixel_formatCogl::PixelFormat

Returns pixel-format.

Returns:

  • (Cogl::PixelFormat)

    pixel-format

#pixel_format=(pixel_format) ⇒ Cogl::PixelFormat

Parameters:

  • pixel_format (Cogl::PixelFormat)

Returns:

  • (Cogl::PixelFormat)

    pixel-format

  • (Cogl::PixelFormat)

    pixel-format

#repeat_x=(repeat_x) ⇒ Boolean

Parameters:

  • repeat_x (Boolean)

Returns:

  • (Boolean)

    repeat-x

  • (Boolean)

    repeat-x

#repeat_x?Boolean

Returns repeat-x.

Returns:

  • (Boolean)

    repeat-x

#repeat_y=(repeat_y) ⇒ Boolean

Parameters:

  • repeat_y (Boolean)

Returns:

  • (Boolean)

    repeat-y

  • (Boolean)

    repeat-y

#repeat_y?Boolean

Returns repeat-y.

Returns:

  • (Boolean)

    repeat-y

#set_area_from_rgb_data(data, has_alpha, x, y, width, height, rowstride, bpp, flags) ⇒ Boolean

Updates a sub-region of the pixel data in a Clutter::Texture.

Parameters:

  • data (Array<Integer>)

    Image data in RGB type colorspace.

  • has_alpha (Boolean)

    Set to TRUE if image data has an alpha channel.

  • x (Integer)

    X coordinate of upper left corner of region to update.

  • y (Integer)

    Y coordinate of upper left corner of region to update.

  • width (Integer)

    Width in pixels of region to update.

  • height (Integer)

    Height in pixels of region to update.

  • rowstride (Integer)

    Distance in bytes between row starts on source buffer.

  • bpp (Integer)

    bytes per pixel (Currently only 3 and 4 supported, depending on has_alpha)

  • flags (Clutter::TextureFlags)

    Clutter::TextureFlags

Returns:

  • (Boolean)

    true on success, false on failure.

#set_from_rgb_data(data, has_alpha, width, height, rowstride, bpp, flags) ⇒ Boolean

Sets Clutter::Texture image data.

Parameters:

  • data (Array<Integer>)

    image data in RGBA type colorspace.

  • has_alpha (Boolean)

    set to true if image data has an alpha channel.

  • width (Integer)

    width in pixels of image data.

  • height (Integer)

    height in pixels of image data

  • rowstride (Integer)

    distance in bytes between row starts.

  • bpp (Integer)

    bytes per pixel (currently only 3 and 4 supported, depending on the value of has_alpha)

  • flags (Clutter::TextureFlags)

    Clutter::TextureFlags

Returns:

  • (Boolean)

    true on success, false on failure.

#set_from_yuv_data(data, width, height, flags) ⇒ Boolean

Sets a Clutter::Texture from YUV image data. If an error occurred, false is returned and error is set.

The YUV support depends on the driver; the format supported by the few drivers exposing this capability are not really useful.

The proper way to convert image data in any YUV colorspace to any RGB colorspace is to use a fragment shader associated with the Clutter::Texture material.

Parameters:

  • data (Array<Integer>)

    Image data in YUV type colorspace.

  • width (Integer)

    Width in pixels of image data.

  • height (Integer)

    Height in pixels of image data

  • flags (Clutter::TextureFlags)

    Clutter::TextureFlags

Returns:

  • (Boolean)

    true if the texture was successfully updated

#set_repeat(repeat_x, repeat_y) ⇒ nil

Sets whether the texture should repeat horizontally or vertically when the actor size is bigger than the image size

Parameters:

  • repeat_x (Boolean)

    true if the texture should repeat horizontally

  • repeat_y (Boolean)

    true if the texture should repeat vertically

Returns:

  • (nil)

#sync_sizeBoolean

Retrieves the value set with clutter_texture_set_sync_size()

Returns:

  • (Boolean)

    true if the Clutter::Texture should have the same preferred size of the underlying image data

#sync_size=(sync_size) ⇒ Boolean

Parameters:

  • sync_size (Boolean)

Returns:

  • (Boolean)

    sync-size

  • (Boolean)

    sync-size

#sync_size?Boolean

Returns sync-size.

Returns:

  • (Boolean)

    sync-size

#tile_wasteInteger

Returns tile-waste.

Returns:

  • (Integer)

    tile-waste

#tile_waste=(tile_waste) ⇒ Integer

Parameters:

  • tile_waste (Integer)

Returns:

  • (Integer)

    tile-waste

  • (Integer)

    tile-waste