natiny_view_get_rect

C
void natiny_view_get_rect(NatinyView view, float* x, float* y,
                            float* width, float* height);

Returns the rectangle a view was given the last time it was laid out.

Parameters

Name Type Description
view NatinyView View handle
x, y float* Receive the left and top edges, in drawing units; may be NULL
width, height float* Receive the size, in drawing units; may be NULL

Example

C
float x, y, w, h;
natiny_view_get_rect(panel, &x, &y, &w, &h);
natiny_render_rectangle(x, y, w, h);