Source File
arrowhead.go
Belonging Package
github.com/pancsta/d2/d2layouts/d2talalayout/internal/labelgeom
// Package labelgeom contains renderer-compatible label geometry that is// shared by the mutable graph bounds and label-placement domains.package labelgeomimport ()// ArrowheadTopLeft returns the renderer-compatible top-left position for an// arrowhead label. D2 stores rendered text dimensions as integers, so the// float dimensions are intentionally truncated here to preserve historical// TALA output.func (geo.Route,bool,, string,, float64,) *geo.Point {:= d2target.BaseConnection().Route =.SrcArrow = d2target.Arrowhead().DstArrow = d2target.Arrowhead():= &d2target.Text{LabelWidth: int(),LabelHeight: int(),}if {.DstLabel =} else {.SrcLabel =}return .GetArrowheadLabelPosition()}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |