Set the pixels for this buffer by copying them, or allocate a new memory region.
This will allocate a new buffer in memory and copy the input pixels
to it. The internal colorspace is not guaranteed to be preserved, and colorspace conversion may happen internally.
If pixels
is null
, then a new empty buffer will be allocated. If the buffer already had pixel data, the previous image data will be dropped. This is the same as Efl.Gfx.Buffer.buffer_managed_set.
The memory buffer pixels
must be large enough to hold width
x height
pixels encoded in the colorspace cspace
.
slice
should not be the return value of Efl.Gfx.Buffer.buffer_managed_get.
buffer_copy_set @pure_virtual { params { @in slice: ptr(const(Eina.Slice)); @in size: Eina.Size2D; @in stride: int @optional; @in cspace: Efl.Gfx.Colorspace @optional; @in plane: int @optional; } return: bool; }
Eina_Bool efl_gfx_buffer_copy_set(Eo *obj, const Eina_Slice *slice, Eina_Size2D size, int stride, Efl_Gfx_Colorspace cspace, int plane);
null
, allocates an empty bufferwidth
.