Tizen Native API  5.5

mapbuf_inheritance_tree.png

This holds one content object and uses an Evas Map of transformation points to be later used with this content. So the content will be moved as a single image. So it will improve performance when you have a complex interface, with a lot of elements, and will need to move it frequently (the content object and its children).

This widget inherits from elm-container-class, so that the functions meant to act on it will work for mapbuf objects:

Default content parts of the mapbuf widget that you can use are:

  • "default" - The main content of the mapbuf

To enable map, elm_mapbuf_enabled_set() should be used.

See how to use this widget in this example: Mapbuf Widget Example

Functions

void elm_mapbuf_auto_set (Elm_Mapbuf *obj, Eina_Bool on)
 Set or unset auto flag for map rendering.
Eina_Bool elm_mapbuf_auto_get (const Elm_Mapbuf *obj)
 Get a value whether auto mode is enabled or not.
void elm_mapbuf_smooth_set (Elm_Mapbuf *obj, Eina_Bool smooth)
 Enable or disable smooth map rendering.
Eina_Bool elm_mapbuf_smooth_get (const Elm_Mapbuf *obj)
 Get a value whether smooth map rendering is enabled or not.
void elm_mapbuf_alpha_set (Elm_Mapbuf *obj, Eina_Bool alpha)
 Set or unset alpha flag for map rendering.
Eina_Bool elm_mapbuf_alpha_get (const Elm_Mapbuf *obj)
 Get a value whether alpha blending is enabled or not.
void elm_mapbuf_enabled_set (Elm_Mapbuf *obj, Eina_Bool enabled)
 Enable or disable the map.
Eina_Bool elm_mapbuf_enabled_get (const Elm_Mapbuf *obj)
 Get a value whether map is enabled or not.
void elm_mapbuf_point_color_set (Elm_Mapbuf *obj, int idx, int r, int g, int b, int a)
 The color of a point (vertex) in the mapbuf.
void elm_mapbuf_point_color_get (const Elm_Mapbuf *obj, int idx, int *r, int *g, int *b, int *a)
 The color of a point (vertex) in the mapbuf.
Evas_Objectelm_mapbuf_add (Evas_Object *parent)

Function Documentation

Add a new mapbuf widget to the given parent Elementary (container) object.

Parameters:
parentThe parent object.
Returns:
A new mapbuf widget handle or NULL, on errors.

This function inserts a new mapbuf widget on the canvas.

Since :
2.3.1
Examples:
mapbuf_example.c.
Eina_Bool elm_mapbuf_alpha_get ( const Elm_Mapbuf *  obj)

Get a value whether alpha blending is enabled or not.

Parameters:
[in]objThe object.
Returns:
The alpha state.
Since :
2.3.1
void elm_mapbuf_alpha_set ( Elm_Mapbuf *  obj,
Eina_Bool  alpha 
)

Set or unset alpha flag for map rendering.

This sets alpha flag for map rendering. If the object is a type that has its own alpha settings, then this will take precedence. Only image objects have this currently. It stops alpha blending of the map area, and is useful if you know the object and/or all sub-objects is 100% solid.

Alpha is enabled by default.

Parameters:
[in]objThe object.
[in]alphaThe alpha state.
Since :
2.3.1
Examples:
mapbuf_example.c.
Eina_Bool elm_mapbuf_auto_get ( const Elm_Mapbuf *  obj)

Get a value whether auto mode is enabled or not.

Parameters:
[in]objThe object.
Returns:
The auto mode state.
Since :
3.0f(2.3.1)
void elm_mapbuf_auto_set ( Elm_Mapbuf *  obj,
Eina_Bool  on 
)

Set or unset auto flag for map rendering.

When a ampbuf object has "auto mode" enabled, then it will enable and disable map mode based on current visibility. Mapbuf will track if you show or hide it AND if the object is inside the canvas viewport or not when it is moved or resized. Note that if you turn automode off, then map mode will be in a disabled state at this point. When you turn it on for the first time, the current state will be evaluated base on current properties of the mapbuf object.

Auto mode is disabled by default.

Parameters:
[in]objThe object.
[in]onThe auto mode state.
Since :
3.0f(2.3.1)
Eina_Bool elm_mapbuf_enabled_get ( const Elm_Mapbuf *  obj)

Get a value whether map is enabled or not.

Parameters:
[in]objThe object.
Returns:
The enabled state.
Since :
2.3.1
void elm_mapbuf_enabled_set ( Elm_Mapbuf *  obj,
Eina_Bool  enabled 
)

Enable or disable the map.

This enables the map that is set or disables it. On enable, the object geometry will be saved, and the new geometry will change (position and size) to reflect the map geometry set.

Also, when enabled, alpha and smooth states will be used, so if the content isn't solid, alpha should be enabled, for example, otherwise a black rectangle will fill the content.

When disabled, the stored map will be freed and geometry prior to enabling the map will be restored.

It's disabled by default.

Parameters:
[in]objThe object.
[in]enabledThe enabled state.
Since :
2.3.1
Examples:
mapbuf_example.c.
void elm_mapbuf_point_color_get ( const Elm_Mapbuf *  obj,
int  idx,
int *  r,
int *  g,
int *  b,
int *  a 
)

The color of a point (vertex) in the mapbuf.

This represents the color of the vertex in the mapbuf. Colors will be linearly interpolated between vertex points through the mapbuf. Color will multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which means it will have no effect on modifying the texture pixels.

Parameters:
[in]objThe object.
[in]idxIndex of point to change, from 0 to 3.
[out]rRed (0 - 255)
[out]gGreen (0 - 255)
[out]bBlue (0 - 255)
[out]aAlpha (0 - 255)
Since (EFL) :
1.9
Since :
2.3.1
void elm_mapbuf_point_color_set ( Elm_Mapbuf *  obj,
int  idx,
int  r,
int  g,
int  b,
int  a 
)

The color of a point (vertex) in the mapbuf.

This represents the color of the vertex in the mapbuf. Colors will be linearly interpolated between vertex points through the mapbuf. Color will multiply the "texture" pixels (like GL_MODULATE in OpenGL). The default color of a vertex in a mapbuf is white solid (255, 255, 255, 255) which means it will have no effect on modifying the texture pixels.

Parameters:
[in]objThe object.
[in]idxIndex of point to change, from 0 to 3.
[in]rRed (0 - 255)
[in]gGreen (0 - 255)
[in]bBlue (0 - 255)
[in]aAlpha (0 - 255)
Since (EFL) :
1.9
Since :
2.3.1
Eina_Bool elm_mapbuf_smooth_get ( const Elm_Mapbuf *  obj)

Get a value whether smooth map rendering is enabled or not.

Parameters:
[in]objThe object.
Returns:
The smooth mode state.
Since :
2.3.1
void elm_mapbuf_smooth_set ( Elm_Mapbuf *  obj,
Eina_Bool  smooth 
)

Enable or disable smooth map rendering.

This sets smoothing for map rendering. If the object is a type that has its own smoothing settings, then both the smooth settings for this object and the map must be turned off.

By default smooth maps are enabled.

Parameters:
[in]objThe object.
[in]smoothThe smooth mode state.
Since :
2.3.1
Examples:
mapbuf_example.c.