summaryrefslogtreecommitdiff
path: root/app/cornu
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:12 +0200
commite50482f994b6ebcce864a412111d376e99205cdb (patch)
treeff3192c6aaf213c4922521bed988e4ed4147f537 /app/cornu
parentd3897ce090dbeb220ed2c782f095597e417cf3cc (diff)
parentb623f5953691b2a0614e6f1f4def86bdbb9a4113 (diff)
Update upstream source from tag 'upstream/5.2.0Beta2.1'
Update to upstream version '5.2.0Beta2.1' with Debian dir 1576f25f4c1496abfed44af31ead67d32c7be650
Diffstat (limited to 'app/cornu')
-rw-r--r--app/cornu/bezctx_xtrkcad.c13
-rw-r--r--app/cornu/bezctx_xtrkcad.h2
2 files changed, 11 insertions, 4 deletions
diff --git a/app/cornu/bezctx_xtrkcad.c b/app/cornu/bezctx_xtrkcad.c
index 1b902b2..f30e1c2 100644
--- a/app/cornu/bezctx_xtrkcad.c
+++ b/app/cornu/bezctx_xtrkcad.c
@@ -41,6 +41,7 @@ typedef struct {
BOOL_T is_open;
BOOL_T has_NAN;
BOOL_T draw_spots;
+ DIST_T spot_size;
coOrd last_pos; // For moveTo
int ends[2]; //Start and End knot number
@@ -168,9 +169,9 @@ static void
seg->type=SEG_FILCRCL;
seg->u.c.center.x = bc->last_pos.x;
seg->u.c.center.y = bc->last_pos.y;
- seg->u.c.radius = 0.25;
+ seg->u.c.radius = bc->spot_size;
seg->width = 0.0;
- seg->color = wDrawColorBlack;
+ seg->color = wDrawColorGrey40;
}
}
@@ -187,7 +188,7 @@ bezctx_xtrkcad_mark_knot(bezctx *z, int knot_idx) {
bezctx *
-new_bezctx_xtrkcad(dynArr_t * segArray, int ends[2], BOOL_T spots) {
+new_bezctx_xtrkcad(dynArr_t * segArray, int ends[2], BOOL_T spots, DIST_T spot_size) {
bezctx_xtrkcad *result = znew(bezctx_xtrkcad, 1);
@@ -203,8 +204,14 @@ new_bezctx_xtrkcad(dynArr_t * segArray, int ends[2], BOOL_T spots) {
result->is_open = FALSE;
result->has_NAN = FALSE;
result->draw_spots = spots;
+ result->spot_size = spot_size;
result->track = TRUE;
+ result->segsArray->cnt =0;
+ result->segsArray->ptr =0;
+ result->segsArray->max =0;
+
+
return &result->base;
}
diff --git a/app/cornu/bezctx_xtrkcad.h b/app/cornu/bezctx_xtrkcad.h
index 4117870..6426481 100644
--- a/app/cornu/bezctx_xtrkcad.h
+++ b/app/cornu/bezctx_xtrkcad.h
@@ -1,4 +1,4 @@
-bezctx * new_bezctx_xtrkcad(dynArr_t * segs, int ends[2], BOOL_T spots);
+bezctx * new_bezctx_xtrkcad(dynArr_t * segs, int ends[2], BOOL_T spots, DIST_T spot_size);
void bezctx_to_xtrkcad(bezctx *bc);
BOOL_T bezctx_xtrkcad_close(bezctx *bc);