Tizen Native API
|
This holds one content object and uses an Evas Map of transformation points to be later used with this content.
So the content is moved, resized, etc as a single image. So it improves performance when you have a complex interface, with a lot of elements, and you need to resize or move it frequently (the content object and its children).
The functions meant to act on it works for mapbuf objects:
The 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.
Functions | |
Evas_Object * | elm_mapbuf_add (Evas_Object *parent) |
Adds a new mapbuf widget to the given parent Elementary (container) object. | |
void | elm_mapbuf_enabled_set (Evas_Object *obj, Eina_Bool enabled) |
Enables or disables the map. | |
Eina_Bool | elm_mapbuf_enabled_get (const Evas_Object *obj) |
Gets a value that indicates whether the map is enabled. | |
void | elm_mapbuf_smooth_set (Evas_Object *obj, Eina_Bool smooth) |
Enables or disables smooth map rendering. | |
Eina_Bool | elm_mapbuf_smooth_get (const Evas_Object *obj) |
Gets a value that indicates whether smooth map rendering is enabled. | |
void | elm_mapbuf_alpha_set (Evas_Object *obj, Eina_Bool alpha) |
Sets or unsets the alpha flag for map rendering. | |
Eina_Bool | elm_mapbuf_alpha_get (const Evas_Object *obj) |
Gets a value that indicates whether alpha blending is enabled. | |
void | elm_mapbuf_point_color_set (Evas_Object *obj, int idx, int r, int g, int b, int a) |
Sets the color of a vertex in the mapbuf. | |
void | elm_mapbuf_point_color_get (Evas_Object *obj, int idx, int *r, int *g, int *b, int *a) |
Gets the color set on a vertex in the mapbuf. |
Function Documentation
Evas_Object* elm_mapbuf_add | ( | Evas_Object * | parent | ) |
Adds a new mapbuf widget to the given parent Elementary (container) object.
This function inserts a new mapbuf widget on the canvas.
- Since :
- 2.3.1
- Parameters:
-
[in] parent The parent object
- Returns:
- A new mapbuf widget handle, otherwise
NULL
in case of an error
Eina_Bool elm_mapbuf_alpha_get | ( | const Evas_Object * | obj | ) |
Gets a value that indicates whether alpha blending is enabled.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The mapbuf object
- Returns:
EINA_TRUE
means alpha blending is enabled, otherwiseEINA_FALSE
indicates it's disabled
If obj isNULL
,EINA_FALSE
is returned.
- See also:
- elm_mapbuf_alpha_set()
void elm_mapbuf_alpha_set | ( | Evas_Object * | obj, |
Eina_Bool | alpha | ||
) |
Sets or unsets the alpha flag for map rendering.
This sets the alpha flag for map rendering. If the object is a type that has its own alpha settings, then this takes 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 the sub-objects is 100% solid.
Alpha is enabled by default.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The mapbuf object [in] alpha If EINA_TRUE
alpha blending is enabled, otherwiseEINA_FALSE
to disable it
Eina_Bool elm_mapbuf_enabled_get | ( | const Evas_Object * | obj | ) |
Gets a value that indicates whether the map is enabled.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The mapbuf object
- Returns:
EINA_TRUE
means the map is enabled, otherwiseEINA_FALSE
indicates that it's disabled
If obj isNULL
,EINA_FALSE
is returned.
- See also:
- elm_mapbuf_enabled_set()
void elm_mapbuf_enabled_set | ( | Evas_Object * | obj, |
Eina_Bool | enabled | ||
) |
Enables or disables the map.
This enables the map that is set or disables it. On enable, the object geometry is saved, and the new geometry changes (position and size) to reflect the map geometry set.
- Since :
- 2.3.1
- Remarks:
- Also, when enabled, alpha and smooth states are used, so if the content isn't solid, alpha should be enabled, for example, otherwise a black rectangle fills the content.
- When disabled, the stored map is freed and the geometry prior to enabling the map is restored.
It's disabled by default.
- Parameters:
-
[in] obj The mapbuf object [in] enabled If EINA_TRUE
the map is enabled, otherwiseEINA_FALSE
to disable it
void elm_mapbuf_point_color_get | ( | Evas_Object * | obj, |
int | idx, | ||
int * | r, | ||
int * | g, | ||
int * | b, | ||
int * | a | ||
) |
Gets the color set on a vertex in the mapbuf.
This gets the color set by elm_mapbuf_point_color_set() on the given vertex of the mapbuf.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The mapbuf object [in] idx The index of the point to get, must be smaller than the map size. [out] r A pointer to red [out] g A pointer to green [out] b A pointer to blue [out] a A pointer to alpha
- See also:
- elm_mapbuf_point_color_set()
void elm_mapbuf_point_color_set | ( | Evas_Object * | obj, |
int | idx, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
Sets the color of a vertex in the mapbuf.
This sets the color of the vertex in the mapbuf. Colors are linearly interpolated between vertex points through the mapbuf. Color multiplies 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 has no effect on modifying the texture pixels.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The mapbuf object [in] idx The index of the point to change, must be smaller than the mapbuf size [in] r Red (0 - 255) [in] g Green (0 - 255) [in] b Blue (0 - 255) [in] a Alpha (0 - 255)
- See also:
- evas_object_map_set()
Eina_Bool elm_mapbuf_smooth_get | ( | const Evas_Object * | obj | ) |
Gets a value that indicates whether smooth map rendering is enabled.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The mapbuf object
- Returns:
EINA_TRUE
means smooth map rendering is enabled, otherwiseEINA_FALSE
indicates that it's disabled
If obj isNULL
,EINA_FALSE
is returned.
- See also:
- elm_mapbuf_smooth_set()
void elm_mapbuf_smooth_set | ( | Evas_Object * | obj, |
Eina_Bool | smooth | ||
) |
Enables or disables 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.
- Since :
- 2.3.1
- Parameters:
-
[in] obj The mapbuf object [in] smooth If EINA_TRUE
smooth map rendering is enabled, otherwiseEINA_FALSE
to disable it