package label
Import Path
github.com/pancsta/d2/lib/label (on go.dev )
Dependency Relation
imports 2 packages , and imported by 25 packages
Package-Level Type Names (only one)
/* sort by: alphabet | popularity */
type Position int8 (basic type)
Methods (total 10 )
( Position) GetPointOnBox (box *geo .Box , padding, width, height float64 ) *geo .Point
( Position) GetPointOnRoute (route geo .Route , strokeWidth, labelPercentage, width, height float64 ) (point *geo .Point , index int )
return the top left point of a width x height label at the given label position on the route
also return the index of the route segment that point is on
( Position) IsBorder () bool
( Position) IsEdgePosition () bool
( Position) IsOnEdge () bool
( Position) IsOutside () bool
( Position) IsShapePosition () bool
( Position) IsUnlocked () bool
( Position) Mirrored () Position
( Position) String () string
Implements (at least 2 )
Position : expvar.Var
Position : fmt.Stringer
As Outputs Of (at least 3 )
func FromString (s string ) Position
func Position.Mirrored () Position
func github.com/pancsta/d2/d2layouts/d2talalayout/internal/nodeshape.Shape .LabelPositionPreferences (tier nodeshape .LabelTier ) map[Position ]struct{}
As Inputs Of (at least 3 )
func github.com/pancsta/d2/d2layouts/d2talalayout/internal/layoutgraph.(*Edge ).LabelTopLeft (labelPosition Position , width, height float64 ) *geo .Point
func github.com/pancsta/d2/d2layouts/d2talalayout/internal/layoutgraph.(*Node ).IconSize (iconPosition Position ) float64
func github.com/pancsta/d2/d2layouts/d2talalayout/internal/layoutgraph.(*Node ).LabelTopLeft (labelPosition Position , width, height float64 ) *geo .Point
As Types Of (total 37 )
const BorderBottomCenter
const BorderBottomLeft
const BorderBottomRight
const BorderLeftBottom
const BorderLeftMiddle
const BorderLeftTop
const BorderRightBottom
const BorderRightMiddle
const BorderRightTop
const BorderTopCenter
const BorderTopLeft
const BorderTopRight
const InsideBottomCenter
const InsideBottomLeft
const InsideBottomRight
const InsideMiddleCenter
const InsideMiddleLeft
const InsideMiddleRight
const InsideTopCenter
const InsideTopLeft
const InsideTopRight
const OutsideBottomCenter
const OutsideBottomLeft
const OutsideBottomRight
const OutsideLeftBottom
const OutsideLeftMiddle
const OutsideLeftTop
const OutsideRightBottom
const OutsideRightMiddle
const OutsideRightTop
const OutsideTopCenter
const OutsideTopLeft
const OutsideTopRight
const UnlockedBottom
const UnlockedMiddle
const UnlockedTop
const Unset
Package-Level Functions (only one)
Package-Level Constants (total 41)
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 .