diff options
author | Ori Bernstein <ori@eigenstate.org> | 2021-01-09 12:20:49 -0800 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2021-01-09 12:20:49 -0800 |
commit | c207b78d079803605d8aec2fe63a059fc4bdb2c6 (patch) | |
tree | 1cdfcad65f3bbbb046f7b572edc0ecf4868a083b /sys/man/2 | |
parent | dda99bbfe55bcf25ec33934c40efc4f9fdca685a (diff) |
libdraw: add bezierpts
This patch exposes the bezierpts function,
providing a way to get the points on a path,
similar how bezsplinepts gives them for b
splines.
Diffstat (limited to 'sys/man/2')
-rw-r--r-- | sys/man/2/draw | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/man/2/draw b/sys/man/2/draw index 79e7c0ddf..878ea3c6c 100644 --- a/sys/man/2/draw +++ b/sys/man/2/draw @@ -103,6 +103,8 @@ int bezierop(Image *dst, Point p0, Point p1, Point p2, Point p3, int end0, int end1, int radius, Image *src, Point sp, Drawop op) .PB +int bezierpts(Point p0, Point p1, Point p2, Point p3, Point **pp) +.PB int bezspline(Image *dst, Point *pt, int npt, int end0, int end1, int radius, Image *src, Point sp) .PB @@ -603,6 +605,16 @@ corresponds to in .IR dst . .TP +\f5bezierpts(\f2a\fP, \f2b\fP, \f2c\fP, \f2d\fP, \f2pp\fP) +.I Bezierpts +returns in +.I pp +a list of points making up the open polygon that +.I bezier +would draw. +The caller is responsible for freeing +.IR *pp . +.TP \f5bezspline(\f2dst\fP, \f2p\fP, \f2np\fP, \f2end0\fP, \f2end1\fP, \f2thick\fP, \f2src\fP, \f2sp\fP) .I Bezspline takes the same arguments as |