feat: add stroke thickness
This commit is contained in:
@@ -6,42 +6,42 @@
|
||||
#include "vector.h"
|
||||
|
||||
typedef struct {
|
||||
V2 p1;
|
||||
V2 p2;
|
||||
V2 p1;
|
||||
V2 p2;
|
||||
} VektorLine;
|
||||
|
||||
typedef struct {
|
||||
V2 *points;
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
V2 *points;
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
} VektorPolyline;
|
||||
|
||||
typedef struct {
|
||||
V2 *points;
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
V2 *points;
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
} VektorPolygon;
|
||||
|
||||
typedef struct {
|
||||
V2 center;
|
||||
double radius;
|
||||
V2 center;
|
||||
double radius;
|
||||
} VektorCircle;
|
||||
|
||||
typedef enum {
|
||||
VEKTOR_LINE,
|
||||
VEKTOR_POLYLINE,
|
||||
VEKTOR_POLYGON,
|
||||
VEKTOR_CIRCLE
|
||||
VEKTOR_LINE,
|
||||
VEKTOR_POLYLINE,
|
||||
VEKTOR_POLYGON,
|
||||
VEKTOR_CIRCLE
|
||||
} VektorPrimitiveKind;
|
||||
|
||||
typedef struct {
|
||||
VektorPrimitiveKind kind;
|
||||
union {
|
||||
VektorLine line;
|
||||
VektorPolyline *polyline;
|
||||
VektorPolygon *polygon;
|
||||
VektorCircle circle;
|
||||
};
|
||||
VektorPrimitiveKind kind;
|
||||
union {
|
||||
VektorLine line;
|
||||
VektorPolyline *polyline;
|
||||
VektorPolygon *polygon;
|
||||
VektorCircle circle;
|
||||
};
|
||||
} VektorPrimitive;
|
||||
|
||||
VektorPolyline *vektor_polyline_new(void);
|
||||
@@ -53,9 +53,9 @@ void vektor_polygon_add_point(VektorPolygon *pl, V2 point);
|
||||
void vektor_polygon_free(VektorPolygon *pl);
|
||||
|
||||
typedef struct {
|
||||
VektorPrimitive *primitives;
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
VektorPrimitive *primitives;
|
||||
size_t count;
|
||||
size_t capacity;
|
||||
} VektorPrimitiveBuffer;
|
||||
|
||||
void vektor_primitivebuffer_add_primitive(VektorPrimitiveBuffer *edges,
|
||||
|
||||
Reference in New Issue
Block a user