PatchworkOS
Loading...
Searching...
No Matches
polygon.h
Go to the documentation of this file.
1#ifndef PATCHWORK_POLYGON
2#define PATCHWORK_POLYGON 1
3
4#include "cmd.h"
5#include "font.h"
6#include "pixel.h"
7#include "rect.h"
8#include "surface.h"
9
10#include <stdint.h>
11
12#if defined(__cplusplus)
13extern "C"
14{
15#endif
16
17typedef struct image image_t;
18
35void polygon_rotate(point_t* points, uint64_t pointCount, double angle, point_t center);
36
48bool polygon_contains(double px, double py, const point_t* points, uint64_t pointCount);
49
52#if defined(__cplusplus)
53}
54#endif
55
56#endif
void polygon_rotate(point_t *points, uint64_t pointCount, double angle, point_t center)
Rotate a polygon around a center point.
Definition polygon.c:4
bool polygon_contains(double px, double py, const point_t *points, uint64_t pointCount)
Check if a point is inside a polygon.
Definition polygon.c:27
static image_t * image
Definition main.c:5
__UINT64_TYPE__ uint64_t
Definition stdint.h:17