~~Title: Efl.Gfx.Buffer~~ ====== Efl.Gfx.Buffer (interface) ====== ===== Description ===== %%Common APIs for all objects representing images and 2D pixel buffers.%% {{page>:develop:api-include:efl:gfx:buffer:description&nouser&nolink&nodate}} ===== Members ===== **[[:develop:api:efl:gfx:buffer:property:alpha|alpha]]** //**(get, set)**//\\ > %%Indicates whether the alpha channel should be used.%% Eina_Bool efl_gfx_buffer_alpha_get(const Eo *obj); void efl_gfx_buffer_alpha_set(Eo *obj, Eina_Bool alpha); \\ **[[:develop:api:efl:gfx:buffer:property:buffer_borders|buffer_borders]]** //**(get)**//\\ > void efl_gfx_buffer_borders_get(const Eo *obj, unsigned int *l, unsigned int *r, unsigned int *t, unsigned int *b); \\ **[[:develop:api:efl:gfx:buffer:method:buffer_copy_set|buffer_copy_set]]**\\ > %%Set the pixels for this buffer by copying them, or allocate a new memory region.%% Eina_Bool efl_gfx_buffer_copy_set(Eo *obj, const Eina_Slice *slice, Eina_Size2D size, int stride, Efl_Gfx_Colorspace cspace, int plane); \\ **[[:develop:api:efl:gfx:buffer:method:buffer_managed_get|buffer_managed_get]]**\\ > %%Get a direct pointer to the internal pixel data, if available.%% Eina_Slice efl_gfx_buffer_managed_get(Eo *obj, int plane); \\ **[[:develop:api:efl:gfx:buffer:method:buffer_managed_set|buffer_managed_set]]**\\ > %%Set the pixels for this buffer, managed externally by the client.%% Eina_Bool efl_gfx_buffer_managed_set(Eo *obj, const Eina_Slice *slice, Eina_Size2D size, int stride, Efl_Gfx_Colorspace cspace, int plane); \\ **[[:develop:api:efl:gfx:buffer:method:buffer_map|buffer_map]]**\\ > %%Map a region of this buffer for read or write access by the CPU.%% Eina_Rw_Slice efl_gfx_buffer_map(Eo *obj, Efl_Gfx_Buffer_Access_Mode mode, const Eina_Rect *region, Efl_Gfx_Colorspace cspace, int plane, int *stride); \\ **[[:develop:api:efl:gfx:buffer:property:buffer_size|buffer_size]]** //**(get, set)**//\\ > %%Rectangular size of the pixel buffer as allocated in memory.%% Eina_Size2D efl_gfx_buffer_size_get(const Eo *obj); void efl_gfx_buffer_size_set(Eo *obj, Eina_Size2D sz); \\ **[[:develop:api:efl:gfx:buffer:method:buffer_unmap|buffer_unmap]]**\\ > %%Unmap a region of this buffer, and update the internal data if needed.%% Eina_Bool efl_gfx_buffer_unmap(Eo *obj, Eina_Rw_Slice slice); \\ **[[:develop:api:efl:gfx:buffer:method:buffer_update_add|buffer_update_add]]**\\ > %%Mark a sub-region of the given image object to be redrawn.%% void efl_gfx_buffer_update_add(Eo *obj, const Eina_Rect *region); \\ **[[:develop:api:efl:gfx:buffer:property:colorspace|colorspace]]** //**(get)**//\\ > %%Returns the current encoding of this buffer's pixels.%% Efl_Gfx_Colorspace efl_gfx_buffer_colorspace_get(const Eo *obj); \\ **[[:develop:api:efl:gfx:buffer:property:stride|stride]]** //**(get)**//\\ > int efl_gfx_buffer_stride_get(const Eo *obj); \\ ===== Events =====