> home > Custom Layer Boundary API

text_layout_create

September 8th 2024
Create a text layout object

Signature

C++
Text_Layout_ID
text_layout_create(Application_Links* app,
                   Buffer_ID buffer_id,
                   Rect_f32 rect,
                   Buffer_Point buffer_point);

Parameters

app

the standard custom layer context pointer

buffer_id

the id of the buffer to read for layout

rect

the region on the screen where the layout will be placed

buffer_point

the point in the buffer that will be placed in the top left corner of the rectangle

Return

the id of the new text layout object, when the buffer exists and contains the buffer point, otherwise zero