diff --git a/src/draw/shapes.typ b/src/draw/shapes.typ index a3ba8acb5..563fca707 100644 --- a/src/draw/shapes.typ +++ b/src/draw/shapes.typ @@ -1136,7 +1136,8 @@ let angle = if type(angle) != std.angle { let (_, c) = coordinate.resolve(ctx, angle) - vector.angle2(a, util.apply-transform(ctx.transform, c)) + vector.angle2(util.apply-transform(ctx.transform, a), + util.apply-transform(ctx.transform, c)) } else { angle } diff --git a/tests/content/angle/ref/1.png b/tests/content/angle/ref/1.png new file mode 100644 index 000000000..9795ac164 Binary files /dev/null and b/tests/content/angle/ref/1.png differ diff --git a/tests/content/angle/test.typ b/tests/content/angle/test.typ new file mode 100644 index 000000000..9fbb0c7b9 --- /dev/null +++ b/tests/content/angle/test.typ @@ -0,0 +1,17 @@ +#import "/src/lib.typ": * +#import "/tests/helper.typ": * +#set page(width: auto, height: auto) + +// #1032 +#test-case({ + import draw: * + set-style(padding: 5pt) + + line((0, 0), (5, 5), name: "line1") + content("line1.50%", angle: "line1.end", anchor: "south", [Content]) + + rotate(15deg) + + line((5, 0), (10, 5), name: "line2") + content("line2.50%", angle: "line2.end", anchor: "south", [Content]) +}) diff --git a/tests/style/fold-stroke/ref/1.png b/tests/style/fold-stroke/ref/1.png index 42bef5fc9..4b226ad06 100644 Binary files a/tests/style/fold-stroke/ref/1.png and b/tests/style/fold-stroke/ref/1.png differ