aboutsummaryrefslogtreecommitdiffstats
path: root/pages/develop/api/efl/gfx/buffer/method/buffer_managed_set.txt
blob: 812b75750c6d47e6d185fc21f32df3b80af4e63f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
~~Title: Efl.Gfx.Buffer.buffer_managed_set~~
===== Description =====

%%Set the pixels for this buffer, managed externally by the client.%%

%%EFL will use the pixel data directly, and update the GPU-side texture if required. This will mark the image as dirty. If %%''slice''%% is %%''null''%%, this will detach the pixel data.%%

%%If the buffer already had pixel data, the previous image data will be dropped. This is the same as %%[[:develop:api:efl:gfx:buffer:method:buffer_copy_set|Efl.Gfx.Buffer.buffer_copy_set]]%%.%%

%%The memory buffer %%''pixels''%% must be large enough to hold %%''width''%% x %%''height''%% pixels encoded in the colorspace %%''cspace''%%.%%

%%See also %%[[:develop:api:efl:gfx:buffer:method:buffer_copy_set|Efl.Gfx.Buffer.buffer_copy_set]]%% if you want EFL to copy the input buffer internally.%%
{{page>:develop:api-include:efl:gfx:buffer:method:buffer_managed_set:description&nouser&nolink&nodate}}

===== Signature =====

<code>
buffer_managed_set @pure_virtual {
    params {
        @in slice: ptr(const(Eina.Slice)) @nullable;
        @in size: Eina.Size2D;
        @in stride: int @optional;
        @in cspace: Efl.Gfx.Colorspace @optional;
        @in plane: int @optional;
    }
    return: bool;
}
</code>

===== C signature =====

<code c>
Eina_Bool efl_gfx_buffer_managed_set(Eo *obj, const Eina_Slice *slice, Eina_Size2D size, int stride, Efl_Gfx_Colorspace cspace, int plane);
</code>

===== Parameters =====

  * **slice** //(in)// - %%If %%''null''%%, detaches the previous buffer.%%
  * **size** //(in)// - %%The size in pixels.%%
  * **stride** //(in)// - %%If 0, automatically guessed from the %%''width''%%.%%
  * **cspace** //(in)// - %%argb8888 by default.%%
  * **plane** //(in)// - %%Plane ID. 0 by default. Useful for planar formats only.%%

===== Implemented by =====

  * **Efl.Gfx.Buffer.buffer_managed_set**