aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2019-02-09 17:25:38 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2019-02-09 17:25:38 +0100
commitc865d2b6896fe66113b2aa50ad44d6a2d29e1954 (patch)
treee87f75d7751105dd5ca5027c214309c9c28ffbe1 /src
parentc71a1cce134b9944d450cfb00a913621132688b9 (diff)
downloadd2tk-c865d2b6896fe66113b2aa50ad44d6a2d29e1954.tar.xz
base: use separate bbox for arc connection point.
Diffstat (limited to 'src')
-rw-r--r--src/base.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/base.c b/src/base.c
index 3770aee..0abb0f0 100644
--- a/src/base.c
+++ b/src/base.c
@@ -3281,13 +3281,13 @@ d2tk_flowmatrix_arc_begin(d2tk_base_t *base, d2tk_flowmatrix_t *flowmatrix,
d2tk_core_bbox_pop(core, ref);
}
+ // matrix
{
- const d2tk_coord_t r2 = r*2;
const d2tk_rect_t bnd = {
.x = x0,
- .y = y0 - r2,
+ .y = y0,
.w = x3 - x0,
- .h = y3 - y0 + r2
+ .h = y3 - y0
};
const size_t ref = d2tk_core_bbox_push(core, true, &bnd);
@@ -3329,7 +3329,21 @@ d2tk_flowmatrix_arc_begin(d2tk_base_t *base, d2tk_flowmatrix_t *flowmatrix,
d2tk_core_stroke(core);
}
- // connection point
+ d2tk_core_bbox_pop(core, ref);
+ }
+
+ // connection point
+ {
+ const d2tk_coord_t r2 = r*2;
+ const d2tk_rect_t bnd = {
+ .x = xp - r,
+ .y = yp - r,
+ .w = r2,
+ .h = r2
+ };
+
+ const size_t ref = d2tk_core_bbox_push(core, true, &bnd);
+
d2tk_core_begin_path(core);
d2tk_core_arc(core, xp, yp, r, 0, 360, true);
d2tk_core_color(core, style->fill_color[triple]);