mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
document ncplane_cursor_move_yx better #1882
This commit is contained in:
parent
49cf9f35ac
commit
f1202df541
2
USAGE.md
2
USAGE.md
@ -914,7 +914,7 @@ ncplane_resize_simple(struct ncplane* n, int ylen, int xlen){
|
||||
|
||||
// Move this plane relative to the standard plane, or the plane to which it is
|
||||
// bound (if it is bound to a plane). It is an error to attempt to move the
|
||||
// standard plane.
|
||||
// standard plane. Specifying a coordinate as -1 will hold it constant.
|
||||
int ncplane_move_yx(struct ncplane* n, int y, int x);
|
||||
|
||||
// Get the origin of plane 'n' relative to its bound plane, or its pile (if
|
||||
|
@ -277,6 +277,12 @@ to multiple ncplanes. So long as all threads are readers, multiple threads may
|
||||
work with a single ncplane. A reading function is any which accepts a **const
|
||||
struct ncplane**.
|
||||
|
||||
A plane has a virtual cursor; move it with **ncplane_cursor_move_yx**.
|
||||
Specifying -1 as one or both coordinates will hold that axis constant. Unless
|
||||
coordinates are specified for a call, action takes place at the plane's
|
||||
virtual cursor, which automatically moves along with output. The current
|
||||
virtual cursor location can be acquired with **ncplane_cursor_yx**.
|
||||
|
||||
**ncplane_yx** returns the coordinates of the specified plane's origin, relative
|
||||
to the plane to which it is bound. Either or both of ***y*** and ***x*** may
|
||||
be **NULL**. **ncplane_y** and **ncplane_x** allow a single component of this
|
||||
@ -423,6 +429,9 @@ each representing a single RGBA pixel, or **NULL** on failure.
|
||||
**ncplane_erase_region** returns -1 if any of its parameters are negative, or
|
||||
if they specify any area beyond the plane.
|
||||
|
||||
**ncplane_cursor_move_yx** returns -1 if the coordinates are beyond the
|
||||
dimensions of the specified plane (except for the special value -1).
|
||||
|
||||
Functions returning **int** return 0 on success, and non-zero on error.
|
||||
|
||||
All other functions cannot fail (and return **void**).
|
||||
|
@ -1492,7 +1492,7 @@ API int ncplane_base(struct ncplane* n, nccell* c);
|
||||
|
||||
// Move this plane relative to the standard plane, or the plane to which it is
|
||||
// bound (if it is bound to a plane). It is an error to attempt to move the
|
||||
// standard plane.
|
||||
// standard plane. Specifying a coordinate as -1 will hold it constant.
|
||||
API int ncplane_move_yx(struct ncplane* n, int y, int x);
|
||||
|
||||
// Get the origin of plane 'n' relative to its bound plane, or pile (if 'n' is
|
||||
|
Loading…
x
Reference in New Issue
Block a user