~~Title: Efl.Gfx.Buffer.buffer_map~~ ====== Efl.Gfx.Buffer.buffer_map ====== ===== Description ===== %%Map a region of this buffer for read or write access by the CPU.%% %%Fetches data from the GPU if needed. This operation may be slow if cpu_readable_fast or cpu_writeable_fast are not true, or if the required colorspace is different from the internal one.%% %%Note that if the buffer has %%[[:develop:api:efl:gfx:buffer:property:buffer_borders|Efl.Gfx.Buffer.buffer_borders]]%%, then %%''x''%% and %%''y''%% may be negative.%% {{page>:develop:api-include:efl:gfx:buffer:method:buffer_map:description&nouser&nolink&nodate}} ===== Signature ===== buffer_map @pure_virtual { params { @in mode: Efl.Gfx.Buffer_Access_Mode; @in region: ptr(const(Eina.Rect)) @optional; @in cspace: Efl.Gfx.Colorspace @optional; @in plane: int @optional; @out stride: int @optional; } return: Eina.Rw_Slice; } ===== C signature ===== 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); ===== Parameters ===== * **mode** //(in)// - %%Specifies whether to map for read-only, write-only or read-write access (OR combination of flags).%% * **region** //(in)// - %%The region to map.%% * **cspace** //(in)// - %%Requested colorspace. If different from the internal cspace, map should try to convert the data into a new buffer. argb8888 by default.%% * **plane** //(in)// - %%Plane ID. 0 by default. Useful for planar formats only.%% * **stride** //(out)// - %%Returns the length in bytes of a mapped line%% ===== Implemented by ===== * [[:develop:api:efl:gfx:buffer:method:buffer_map|Efl.Gfx.Buffer.buffer_map]] * [[:develop:api:efl:canvas:proxy:method:buffer_map|Efl.Canvas.Proxy.buffer_map]] * [[:develop:api:efl:canvas:scene3d:method:buffer_map|Efl.Canvas.Scene3d.buffer_map]] * [[:develop:api:efl:canvas:image:method:buffer_map|Efl.Canvas.Image.buffer_map]]