aboutsummaryrefslogtreecommitdiffstats
path: root/rtgrpblib_fill_shapes.3
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-02-07 22:38:36 +0100
committerMattias Andrée <maandree@kth.se>2023-02-07 22:38:36 +0100
commit6bea61a199dd841b23053cf1b8ccd3dd753c0846 (patch)
tree62e526e51eac4b210305177dcc5222e800d42d35 /rtgrpblib_fill_shapes.3
parentREADME: add usage information (diff)
downloadlibrifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-6bea61a199dd841b23053cf1b8ccd3dd753c0846.tar.gz
librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-6bea61a199dd841b23053cf1b8ccd3dd753c0846.tar.bz2
librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket-6bea61a199dd841b23053cf1b8ccd3dd753c0846.tar.xz
Add man pages
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'rtgrpblib_fill_shapes.3')
-rw-r--r--rtgrpblib_fill_shapes.385
1 files changed, 85 insertions, 0 deletions
diff --git a/rtgrpblib_fill_shapes.3 b/rtgrpblib_fill_shapes.3
new file mode 100644
index 0000000..7bd58b5
--- /dev/null
+++ b/rtgrpblib_fill_shapes.3
@@ -0,0 +1,85 @@
+.TH RTGRPBLIB_FILL_SHAPES 3 LIBRIFUNKTIONSTECKENSNITTSGLYFRASTERISERINGSPROGRAMBIBLIOTEKET
+.SH NAME
+rtgrpblib_fill_shapes - Generate image from applied drawing of filled shapes
+
+.SH DESCRIPTION
+.LP
+.nf
+#include <librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket.h>
+
+void rtgrpblib_fill_shapes(double *image, size_t rowsize, const RTGRPBLIB_RASTER *\fIraster\fP);
+.fi
+.PP
+Link with
+.IR "-lrifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket -lm" .
+
+.SH DESCRIPTION
+The
+.BR rtgrpblib_fill_shapes ()
+function creates an user-usable image from a drawing.
+After drawing each shapes component curves, to
+.IR raster ,
+this function creates an image of these shapes filled in,
+and stores the image in the
+.I image
+buffer.
+.PP
+All drawn shapes must be closed. When shapes overlap,
+the subtract from each other if the are drawn in opposite
+angular direction, and add to each other if the are drawn
+in angular direction.
+.PP
+.I image
+shall be a row-major ordered buffer of single-element cells
+that is at least as wide as
+.I raster
+and at least as tall as
+.IR raster .
+The actual width shall be specified in the
+.I rowsize
+parameter, however the function will only use area
+specified by the size of
+.IR raster ,
+meaning that is, for example,
+.I raster
+is 10 cells wide, but
+.I rowsize
+is 15, only the 10 first columns in
+.I image
+will be written to, and the 5 last columns
+will remain untouched.
+
+.SH RETURN VALUES
+None.
+
+.SH ERRORS
+None.
+
+.SH APPLICATION USAGE
+As librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket
+is a font rasterisation library it is not designed to deal
+with overlapping shapes other than removing a shape from
+inside another shape (e.g. making the hole in the O). For the
+best result in other cases, it is recommended to create a
+union shape of overlapping shapes rather than drawing them
+independently (this should not be necessarily for rastersing
+text).
+
+.SH NOTES
+Row-major order means that each row is contiguously index,
+if a row-major ordered buffer is
+.I w
+cells wide, the point
+.RI ( x ,
+.IR y )
+has the index
+.IR (y*w+x) .
+
+.SH SEE ALSO
+.BR librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket (7),
+.BR rtgrpblib_create_raster (3),
+.BR rtgrpblib_reset_raster (3),
+.BR rtgrpblib_draw_linear_bezier (3),
+.BR rtgrpblib_draw_quadratic_bezier (3),
+.BR rtgrpblib_draw_cubic_bezier (3),
+.BR rtgrpblib_draw_elliptical_arc (3)