Loading...
Searching...
No Matches
path.h
Go to the documentation of this file.
#ifndef DRIVERLIB_PATH_H
#define DRIVERLIB_PATH_H
enum path_mode {
P_MOVE,
P_CONT,
P_CLOSE,
};
struct vertex {
double x, y;
int mode;
};
struct path {
struct vertex *vertices;
int count;
int alloc;
int start;
};
void path_init(struct path *);
void path_free(struct path *);
void path_alloc(struct path *, int);
void path_reset(struct path *);
void path_append(struct path *, double, double, int);
void path_copy(struct path *, const struct path *);
void path_begin(struct path *);
void path_move(struct path *, double, double);
void path_cont(struct path *, double, double);
void path_close(struct path *);
void path_stroke(struct path *, void (*)(double, double, double, double));
#endif
path_cont
void path_cont(struct path *, double, double)
Definition path.c:78
path_init
void path_init(struct path *)
Definition path.c:4
path_alloc
void path_alloc(struct path *, int)
Definition path.c:22
path_append
void path_append(struct path *, double, double, int)
Definition path.c:37
path_reset
void path_reset(struct path *)
Definition path.c:31
path_mode
path_mode
Definition path.h:4
P_CONT
@ P_CONT
Definition path.h:6
P_MOVE
@ P_MOVE
Definition path.h:5
P_CLOSE
@ P_CLOSE
Definition path.h:7
path_close
void path_close(struct path *)
Definition path.c:83
path_move
void path_move(struct path *, double, double)
Definition path.c:72
path_begin
void path_begin(struct path *)
Definition path.c:66
path_free
void path_free(struct path *)
Definition path.c:12
path_stroke
void path_stroke(struct path *, void(*)(double, double, double, double))
Definition path.c:96
path_copy
void path_copy(struct path *, const struct path *)
Definition path.c:51
path
Definition path.h:15
path::count
int count
Definition path.h:17
path::start
int start
Definition path.h:19
path::vertices
struct vertex * vertices
Definition path.h:16
path::alloc
int alloc
Definition path.h:18
vertex
Definition path.h:10
vertex::mode
int mode
Definition path.h:12
vertex::x
double x
Definition path.h:11
vertex::y
double y
Definition path.h:11