![]() |
![]() |
![]() |
Netbook Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
NbtkTextureFrame; ClutterActor * nbtk_texture_frame_new (ClutterTexture *texture, gfloat top, gfloat right, gfloat bottom, gfloat left); void nbtk_texture_frame_set_parent_texture (NbtkTextureFrame *frame, ClutterTexture *texture); ClutterTexture * nbtk_texture_frame_get_parent_texture (NbtkTextureFrame *frame); void nbtk_texture_frame_set_frame (NbtkTextureFrame *frame, gfloat top, gfloat right, gfloat bottom, gfloat left); void nbtk_texture_frame_get_frame (NbtkTextureFrame *frame, gfloat *top, gfloat *right, gfloat *bottom, gfloat *left);
"bottom" gfloat : Read / Write "left" gfloat : Read / Write "parent-texture" ClutterTexture* : Read / Write / Construct "right" gfloat : Read / Write "top" gfloat : Read / Write
typedef struct _NbtkTextureFrame NbtkTextureFrame;
The contents of this structure are private and should only be accessed through the public API.
ClutterActor * nbtk_texture_frame_new (ClutterTexture *texture, gfloat top, gfloat right, gfloat bottom, gfloat left);
A NbtkTextureFrame is a specialized texture that efficiently clones
an area of the given texture
while keeping preserving portions of the
same texture.
A NbtkTextureFrame can be used to make a rectangular texture fit a given size without stretching its borders.
|
a ClutterTexture or NULL
|
|
top margin preserving its content |
|
right margin preserving its content |
|
bottom margin preserving its content |
|
left margin preserving its content |
Returns : |
the newly created NbtkTextureFrame |
void nbtk_texture_frame_set_parent_texture (NbtkTextureFrame *frame, ClutterTexture *texture);
Set the ClutterTexture used by this NbtkTextureFrame
|
A NbtkTextureFrame |
|
A ClutterTexture |
ClutterTexture * nbtk_texture_frame_get_parent_texture (NbtkTextureFrame *frame);
Return the texture used by the NbtkTextureFrame
|
A NbtkTextureFrame |
Returns : |
a ClutterTexture owned by the NbtkTextureFrame |
void nbtk_texture_frame_set_frame (NbtkTextureFrame *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.
|
A NbtkTextureFrame |
|
width of the top slice |
|
width of the right slice |
|
width of the bottom slice |
|
width of the left slice |
void nbtk_texture_frame_get_frame (NbtkTextureFrame *frame, gfloat *top, gfloat *right, gfloat *bottom, gfloat *left);
Retrieve the current slice lines from the specified frame.
|
A NbtkTextureFrame |
|
width of the top slice |
|
width of the right slice |
|
width of the bottom slice |
|
width of the left slice |
"bottom"
property"bottom" gfloat : Read / Write
Bottom offset.
Allowed values: >= 0
Default value: 0
"parent-texture"
property"parent-texture" ClutterTexture* : Read / Write / Construct
The parent ClutterTexture.
"right"
property"right" gfloat : Read / Write
Right offset.
Allowed values: >= 0
Default value: 0