implement ncplane_abs_yx() #1286

pull/1293/head
nick black 4 years ago
parent 1c0a623b8b
commit 0e8f7dfbe7
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -2147,6 +2147,19 @@ const notcurses* ncplane_notcurses_const(const ncplane* n){
return ncplane_pile_const(n)->nc;
}
static void
ncplane_abs_yx_recurse(const ncplane* n, int* RESTRICT y, int* RESTRICT x){
if(n->boundto != n){
ncplane_translate(n, n->boundto, y, x);
ncplane_abs_yx_recurse(n->boundto, y, x);
}
}
void ncplane_abs_yx(const ncplane* n, int* RESTRICT y, int* RESTRICT x){
ncplane_yx(n, y, x);
ncplane_abs_yx_recurse(n->boundto, y, x);
}
ncplane* ncplane_parent(ncplane* n){
return n->boundto;
}

Loading…
Cancel
Save