aboutsummaryrefslogtreecommitdiffstats
path: root/librifunktionsteckensnittsglyfrasteriseringsprogrambiblioteket.h
blob: fffeae7d4bc2969b47bcee3deb884b4dcbef531a (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
/* See LICENSE file for copyright and license details. */
#ifndef LIBRIFUNKTIONSTECKENSNITTSGLYFRASTERISERINGSPROGRAMBIBLIOTEKET_H
#define LIBRIFUNKTIONSTECKENSNITTSGLYFRASTERISERINGSPROGRAMBIBLIOTEKET_H

#include <stddef.h>


typedef struct rtgrpblib_raster RTGRPBLIB_RASTER;


RTGRPBLIB_RASTER *rtgrpblib_create_raster(size_t width, size_t height);
int rtgrpblib_reset_raster(RTGRPBLIB_RASTER *raster, size_t width, size_t height);

void rtgrpblib_set_draftness(RTGRPBLIB_RASTER *raster, double draftness);

void rtgrpblib_fill_shapes(double *restrict image, size_t rowsize, const RTGRPBLIB_RASTER *raster);

void rtgrpblib_draw_linear_bezier(RTGRPBLIB_RASTER *restrict raster,
                                  double x1, double y1,
                                  double x2, double y2);

void rtgrpblib_draw_quadratic_bezier(RTGRPBLIB_RASTER *restrict raster,
                                     double x1, double y1,
                                     double x2, double y2,
                                     double x3, double y3);

void rtgrpblib_draw_cubic_bezier(RTGRPBLIB_RASTER *restrict raster,
                                 double x1, double y1,
                                 double x2, double y2,
                                 double x3, double y3,
                                 double x4, double y4);

void rtgrpblib_draw_circular_arc(RTGRPBLIB_RASTER *restrict raster,
                                 double x0, double y0,
                                 double semiwidth, double semiheight,
                                 double start, double end);

/* TODO add support for outlining */

#endif