aboutsummaryrefslogtreecommitdiffstats
path: root/rtgrpblib_create_raster.3
blob: 63250e93c338c792817eea602516850401372572 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.TH RTGRPBLIB_CREATE_RASTER 3 LIBRIFUNKTIONSTECKENSNITTSGLYFRASTERISERINGSPROGRAMBIBLIOTEKET
.SH NAME
rtgrpblib_create_raster - Create a drawing buffer

.SH DESCRIPTION
.LP
.nf
#include <librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket.h>

typedef struct rtgrpblib_raster RTGRPBLIB_RASTER;

RTGRPBLIB_RASTER *rtgrpblib_create_raster(size_t \fIwidth\fP, size_t \fIheight\fP);
.fi
.PP
Link with
.IR "-lrifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket" .

.SH DESCRIPTION
The
.BR rtgrpblib_create_raster ()
function creates a buffer, with configurations, that the
library's drawing functions can draw curves in, which the
.BR rtgrpblib_fill_shapes (3)
function can ultimately process to generate a image.
.PP
The created buffer will be
.I width
cells wide, and
.I height
cells tall.
.PP
The returned object can be deallocated using the
.BR free (3)
function, it can also be reinitialised and reshaped
using the
.BR rtgrpblib_reset_raster (3)
function.

.SH RETURN VALUES
The
.BR rtgrpblib_create_raster ()
function returns a pointer to a newly allocated object
upon successful completion, and
.I NULL
on failure.

.SH ERRORS
The
.BR rtgrpblib_create_raster ()
function will fail if:
.TP
.B EINVAL
.I width
or
.I height
is zero.
.LP
and may fail if:
.TP
.B ENOMEM
Cannot allocate enough memory.

.SH SEE ALSO
.BR librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket (7),
.BR rtgrpblib_reset_raster (3),
.BR rtgrpblib_set_draftness (3),
.BR rtgrpblib_fill_shapes (3)