6 starPath(document
.getElementById("marker-path-cw"), true, 110, 110, 56, 8, 36, 80, Math
.PI
/6);
7 starPath(document
.getElementById("marker-path-ccw"), false, 310, 110, 56, 8, 36, 80, Math
.PI
/6);
10 // Generate a star path
11 // cw - true for clockwise, false for counter-clockwise
12 // centered at (cx,cy)
14 // s 'spikes' of length l
17 function starPath(el
, cw
, cx
, cy
, r
, s
, l
, n
, t
) {
19 for (var i
=0; i
<=2*Math
.PI
; i
+=2*Math
.PI
/n
) {
21 var px
= cx
+ (r
+l
*Math
.cos(a
*s
))*Math
.sin(a
+t
);
22 var py
= cy
+ (r
+l
*Math
.cos(a
*s
))*Math
.cos(a
+t
);
23 d
+= (d
.length
? "L" : "M") + px
+ " " + py
;
25 el
.setAttribute("d", d
);
38 marker-mid: url(#marker);
42 <body onload=
"startTest()">
43 Test for wkbug.com/
112054.
44 This test passes if the green star has orange markers pointing outside only and the blue star has orange markers pointing inside only.
<br/>
45 <svg width=
"500" height=
"500">
46 <marker id=
"marker" markerWidth=
"15" markerHeight=
"15" orient=
"auto">
47 <!-- This marker points in the direction of the bisector angle. -->
48 <path d=
"M0 0L4 0L2 5L0 0Z" fill=
"orange" stroke-width='
0.5px' stroke='black'
/>
50 <path id=
"marker-path-cw" class=
"marker-path"/>
51 <path id=
"marker-path-ccw" class=
"marker-path"/>