MxTextureFrame

MxTextureFrame — Stretch a texture to fit the entire allocation

Functions

Properties

gfloat bottom Read / Write / Construct
gfloat left Read / Write / Construct
ClutterTexture * parent-texture Read / Write / Construct
gfloat right Read / Write / Construct
gfloat top Read / Write / Construct

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MxTextureFrame

Implemented Interfaces

MxTextureFrame implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.

Description

MxTextureFrame

Functions

mx_texture_frame_new ()

ClutterActor *
mx_texture_frame_new (ClutterTexture *texture,
                      gfloat top,
                      gfloat right,
                      gfloat bottom,
                      gfloat left);

A MxTextureFrame is a specialized texture that efficiently clones an area of the given texture while keeping preserving portions of the same texture.

A MxTextureFrame can be used to make a rectangular texture fit a given size without stretching its borders.

Parameters

texture

a ClutterTexture or NULL

 

left

left margin preserving its content

 

top

top margin preserving its content

 

right

right margin preserving its content

 

bottom

bottom margin preserving its content

 

Returns

the newly created MxTextureFrame


mx_texture_frame_set_parent_texture ()

void
mx_texture_frame_set_parent_texture (MxTextureFrame *frame,
                                     ClutterTexture *texture);

Set the ClutterTexture used by this MxTextureFrame

Parameters

frame

A MxTextureFrame

 

texture

A ClutterTexture

 

mx_texture_frame_get_parent_texture ()

ClutterTexture *
mx_texture_frame_get_parent_texture (MxTextureFrame *frame);

Return the texture used by the MxTextureFrame

Parameters

frame

A MxTextureFrame

 

Returns

a ClutterTexture owned by the MxTextureFrame.

[transfer none]


mx_texture_frame_set_border_values ()

void
mx_texture_frame_set_border_values (MxTextureFrame *frame,
                                    gfloat top,
                                    gfloat right,
                                    gfloat bottom,
                                    gfloat left);

Set the slice lines of the specified frame. The slices are calculated as widths from the edge of the frame.

Parameters

frame

A MxTextureFrame

 

top

width of the top slice

 

right

width of the right slice

 

bottom

width of the bottom slice

 

left

width of the left slice

 

mx_texture_frame_get_border_values ()

void
mx_texture_frame_get_border_values (MxTextureFrame *frame,
                                    gfloat *top,
                                    gfloat *right,
                                    gfloat *bottom,
                                    gfloat *left);

Retrieve the current slice lines from the specified frame.

Parameters

frame

A MxTextureFrame

 

top

width of the top slice

 

right

width of the right slice

 

bottom

width of the bottom slice

 

left

width of the left slice

 

Types and Values

struct MxTextureFrame

struct MxTextureFrame;

The contents of this structure are private and should only be accessed through the public API.


struct MxTextureFrameClass

struct MxTextureFrameClass {
  ClutterActorClass parent_class;

  /* padding for future expansion */
  void (*_padding_0) (void);
  void (*_padding_1) (void);
  void (*_padding_2) (void);
  void (*_padding_3) (void);
  void (*_padding_4) (void);
};

Property Details

The “bottom” property

  “bottom”                   gfloat

Bottom offset.

Owner: MxTextureFrame

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0


The “left” property

  “left”                     gfloat

Left offset.

Owner: MxTextureFrame

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0


The “parent-texture” property

  “parent-texture”           ClutterTexture *

The parent ClutterTexture.

Owner: MxTextureFrame

Flags: Read / Write / Construct


The “right” property

  “right”                    gfloat

Right offset.

Owner: MxTextureFrame

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0


The “top” property

  “top”                      gfloat

Top offset.

Owner: MxTextureFrame

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0