> home > Custom Layer Boundary API

text_layout_character_on_screen

January 19th 2020
Get the rectangle covered by a character in the layout

Signature

C++
Rect_f32
text_layout_character_on_screen(Application_Links* app,
                                Text_Layout_ID layout_id,
                                i64 pos);

Parameters

app

the standard custom layer context pointer

layout_id

the id of the text layout object

pos

the byte position to query

Return

on success, when the object exists and the position is visible in the layout, the rectangle in pixels covered by the character, cleared to zero otherwise