summaryrefslogtreecommitdiff
path: root/inc/cad/svg.h
blob: 7a7e79936333238c89a7f0ebf4dc6e6ec5d4a9d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include "cad/solve.h"
#include "cad/topology.h"

enum LineStyle {
	LSTYLE_NORMAL,
	LSTYLE_CONSTRUCTION,
	LSTYLE_INDICATOR,
	LSTYLE_INDICATOR_INLINE,
};
#define TEXT_OFFSET 0.4

void plot_line_between(struct point p1, struct point p2);
void plot_arc_between_style(struct point c, struct point p1, struct point p2, enum LineStyle style);
void plot_arc_between(struct point c, struct point p1, struct point p2);
void plot_text(struct point p, double angle, char* str);

void begin_drawing();
void draw_constraints(struct constraints *constraints);
void draw_topology(struct topology *topo);
void end_drawing();