Mapbuf

../_images/mapbuf-preview.png

Widget description

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, resized, etc as a single image. So it will improve performance when you have a complex interface, with a lot of elements, and will need to resize or move it frequently (the content object and its children).

Layout content parts

  • default - The main content of the mapbuf

Inheritance diagram

Inheritance diagram of Mapbuf
class efl.elementary.Mapbuf(Object parent, *args, **kwargs)

Bases: efl.elementary.__init__.Object

This is the class that actually implements the widget.

Parameters
  • parent (efl.evas.Object) – The parent object

  • **kwargs – All the remaining keyword arguments are interpreted as properties of the instance

alpha

The alpha state of the map.

Type

bool

alpha_get()
alpha_set(alpha)
auto

When a mapbuf 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.

Type

bool

New in version 1.8.

auto_get()
auto_set(on)
enabled

The enabled state of the map.

Type

bool

enabled_get()
enabled_set(enabled)
point_color_get(idx)

Get the color on a vertex in the mapbuf.

This gets the color set by point_color_set() on the given vertex of the mapbuf.

Parameters

idx – index of point to query. Must be smaller than mapbuf size.

Returns

the color of the point

Return type

tuple (r, g, b, a)

New in version 1.9.

point_color_set(idx, r, g, b, a)

Set the color of a vertex in the mapbuf.

This sets 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 affect on modifying the texture pixels.

Parameters
  • idx – index of point to change. Must be smaller than mapbuf size.

  • r – red (0 - 255)

  • g – green (0 - 255)

  • b – blue (0 - 255)

  • a – alpha (0 - 255)

New in version 1.9.

smooth

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.

Type

bool

smooth_get()
smooth_set(smooth)