From ca7ddb25bc58ee76cfa1d739bd1b4db8760dfaad Mon Sep 17 00:00:00 2001 From: Leonard Ritter Date: Fri, 10 Oct 2014 04:55:55 +0200 Subject: [PATCH] bend wire on vertical distance as well --- blendish.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blendish.h b/blendish.h index a6d30c2..350e498 100644 --- a/blendish.h +++ b/blendish.h @@ -1681,7 +1681,8 @@ void bndNodePort(NVGcontext *ctx, float x, float y, BNDwidgetState state, void bndColoredNodeWire(NVGcontext *ctx, float x0, float y0, float x1, float y1, NVGcolor color0, NVGcolor color1) { - float delta = fabsf(x1 - x0)*(float)bnd_theme.nodeTheme.noodleCurving/10.0f; + float length = bnd_fmaxf(fabsf(x1 - x0),fabsf(y1 - y0)); + float delta = length*(float)bnd_theme.nodeTheme.noodleCurving/10.0f; nvgBeginPath(ctx); nvgMoveTo(ctx, x0, y0);