summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/render/shapes.scm18
1 files changed, 11 insertions, 7 deletions
diff --git a/chickadee/render/shapes.scm b/chickadee/render/shapes.scm
index 0e9c0a1..6981807 100644
--- a/chickadee/render/shapes.scm
+++ b/chickadee/render/shapes.scm
@@ -125,13 +125,17 @@ void main (void) {
}
}
"))))
- (lambda* (x1 y1 x2 y2 #:key
- (thickness 1.0)
- (feather 1.0)
- (cap 'round)
- (color white)
- (shader (force default-shader)))
- (let* ((dx (- x2 x1))
+ (lambda* (start end #:key
+ (thickness 0.5)
+ (feather 1.0)
+ (cap 'round)
+ (color white)
+ (shader (force default-shader)))
+ (let* ((x1 (vec2-x start))
+ (y1 (vec2-y start))
+ (x2 (vec2-x end))
+ (y2 (vec2-y end))
+ (dx (- x2 x1))
(dy (- y2 y1))
(length (sqrt (+ (expt dx 2) (expt dy 2))))
(padding (/ (ceiling (+ thickness (* feather 2.5))) 2.0))