package svg

Import Path
	oss.terrastruct.com/d2/lib/svg (on go.dev)

Dependency Relation
	imports 8 packages, and imported by 4 packages

Involved Source Files path.go text.go
Package-Level Type Names (only one)
/* sort by: | */
Commands []string Current *geo.Point Path []geo.Intersectable ScaleX float64 ScaleY float64 Start *geo.Point TopLeft *geo.Point (*SvgPathContext) Absolute(x, y float64) *geo.Point (*SvgPathContext) C(isLowerCase bool, x1, y1, x2, y2, x3, y3 float64) (*SvgPathContext) H(isLowerCase bool, x float64) (*SvgPathContext) L(isLowerCase bool, x, y float64) (*SvgPathContext) PathData() string (*SvgPathContext) Relative(base *geo.Point, dx, dy float64) *geo.Point (*SvgPathContext) StartAt(p *geo.Point) (*SvgPathContext) V(isLowerCase bool, y float64) (*SvgPathContext) Z() func NewSVGPathContext(tl *geo.Point, sx, sy float64) *SvgPathContext
Package-Level Functions (total 6)
Given control points p1, p2, p3, p4, calculate the segment of this bezier curve from t0 -> t1 where {0 <= t0 < t1 <= 1}. Uses De Casteljau's algorithm, referenced: https://stackoverflow.com/questions/11703283/cubic-bezier-curve-segment/11704152#11704152
func GetStrokeDashAttributes(strokeWidth, dashGapSize float64) (float64, float64)
Splits an SVG path into two SVG paths, with the first path being ~{percentage}% of the path
func SVGID(text string) string