add unfilled triangle to sketch renderer

This commit is contained in:
Gavin Nishizawa 2023-12-07 10:49:58 -08:00
parent d337f71513
commit 81868de8f6
No known key found for this signature in database
GPG key ID: AE3B177777CE55CD

View file

@ -733,6 +733,14 @@ func ArrowheadJS(r *Runner, arrowhead d2target.Arrowhead, stroke string, strokeW
stroke, stroke,
stroke, stroke,
) )
case d2target.UnfilledTriangleArrowhead:
arrowJS = fmt.Sprintf(
`node = rc.polygon(%s, { strokeWidth: %d, stroke: "%s", fill: "%s", fillStyle: "solid", seed: 2 })`,
`[[-10, -4], [0, 0], [-10, 4]]`,
strokeWidth,
stroke,
BG_COLOR,
)
case d2target.DiamondArrowhead: case d2target.DiamondArrowhead:
arrowJS = fmt.Sprintf( arrowJS = fmt.Sprintf(
`node = rc.polygon(%s, { strokeWidth: %d, stroke: "%s", fill: "%s", fillStyle: "solid", seed: 1 })`, `node = rc.polygon(%s, { strokeWidth: %d, stroke: "%s", fill: "%s", fillStyle: "solid", seed: 1 })`,