summaryrefslogtreecommitdiff
path: root/src/svg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/svg.c')
-rw-r--r--src/svg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svg.c b/src/svg.c
index 23a62c8..7144482 100644
--- a/src/svg.c
+++ b/src/svg.c
@@ -127,7 +127,7 @@ double project_point_to_line_distance(struct point p, struct line l) {
// @HACK There's a rounding error here that can cause d1 to end up
// negative. Just take the abolute value of it to get around that.
double d1 = fabs(glm_vec2_norm2(p.pos) - pow(c, 2)/glm_vec2_norm2(l.norm));
- assert(d1 >= 0.0);
+ // assert(d1 >= 0.0);
double m1 = sqrt(d1 / glm_vec2_norm2(l.norm));
return SIGNOF(det) * m1;
@@ -369,7 +369,7 @@ void begin_drawing(struct canvas *canvas) {
assert(canvas->f != NULL);
assert(canvas->state == CANVAS_INIT);
- fprintf(canvas->f, "<svg version=\"1.1\" viewBox=\"-100 -150 200 200\" width=\"1200\" height=\"1200\" xmlns=\"http://www.w3.org/2000/svg\">\n");
+ fprintf(canvas->f, "<svg version=\"1.1\" viewBox=\"-50 -50 100 100\" width=\"1200\" height=\"1200\" xmlns=\"http://www.w3.org/2000/svg\">\n");
fprintf(canvas->f, "<defs>\n");
fprintf(canvas->f, "\t<marker id=\"triangle\" viewBox=\"0 0 10 10\" refX=\"10\" refY=\"5\" markerUnits=\"strokeWidth\" markerWidth=\"6\" markerHeight=\"6\" orient=\"auto-start-reverse\">\n");
fprintf(canvas->f, "\t\t<path d=\"M 0 0 L 10 5 L 0 10 z\" fill=\"blue\" opacity=\"0.3\" />\n");