package geometry
Import Path
github.com/d2lang/elk-go/internal/geometry (on go.dev )
Dependency Relation
imports 5 packages , and imported by 25 packages
Package-Level Type Names (total 4)
/* sort by: alphabet | popularity */
type Chain ([])
Chain is ELK's ordered KVectorChain.
Methods (total 10 )
( Chain) Clone () Chain
( Chain) HasInfinite () bool
( Chain) HasNaN () bool
( Chain) Length () float64
( Chain) Offset (offset Point ) Chain
( Chain) PointAt (distance float64 ) Point
PointAt returns a point at distance from the start, or from the end when
distance is negative.
( Chain) Reverse () Chain
( Chain) Scale (factor float64 ) Chain
( Chain) ScaleXY (x, y float64 ) Chain
( Chain) String () string
Implements (at least 2 )
Chain : expvar.Var
Chain : fmt.Stringer
As Outputs Of (at least 10 )
func ParseChain (input string ) (Chain , error )
func Chain.Clone () Chain
func Chain.Offset (offset Point ) Chain
func Chain.Reverse () Chain
func Chain.Scale (factor float64 ) Chain
func Chain.ScaleXY (x, y float64 ) Chain
func github.com/d2lang/elk-go/internal/common/elkutil.DetermineJunctionPoints (model *graph .Model , edgeID graph .EdgeID ) (Chain , error )
func github.com/d2lang/elk-go/internal/graph.(*Model ).SectionChain (section graph .SectionID ) Chain
func github.com/d2lang/elk-go/internal/layered/intermediate/loops/routing.CutPolylineCorners (points Chain , distance float64 ) Chain
func github.com/d2lang/elk-go/internal/layered/p5edges.CubicNUBToBezier (points Chain ) Chain
As Inputs Of (at least 3 )
func github.com/d2lang/elk-go/internal/common/elkutil.ApplyVectorChain (model *graph .Model , sectionID graph .SectionID , chain Chain )
func github.com/d2lang/elk-go/internal/layered/intermediate/loops/routing.CutPolylineCorners (points Chain , distance float64 ) Chain
func github.com/d2lang/elk-go/internal/layered/p5edges.CubicNUBToBezier (points Chain ) Chain
type Point (struct)
Point is the Go counterpart of ELK's KVector.
Fields (total 2 )
X float64
Y float64
Methods (total 21 )
( Point) Add (q Point ) Point
( Point) Angle (q Point ) float64
( Point) Bound (lowX, lowY, highX, highY float64 ) Point
( Point) Cross (q Point ) float64
( Point) Degrees () float64
( Point) Distance (q Point ) float64
( Point) Dot (q Point ) float64
( Point) FuzzyEqual (q Point , tolerance float64 ) bool
( Point) IsInfinite () bool
( Point) IsNaN () bool
( Point) Length () float64
( Point) LengthSquared () float64
( Point) Negate () Point
( Point) Normalize () Point
( Point) Radians () float64
Radians returns an angle in [0, 2*pi), matching KVector.toRadians.
( Point) Rotate (angle float64 ) Point
( Point) Scale (factor float64 ) Point
( Point) ScaleToLength (length float64 ) Point
( Point) ScaleXY (x, y float64 ) Point
( Point) String () string
( Point) Sub (q Point ) Point
Implements (at least 2 )
Point : expvar.Var
Point : fmt.Stringer
As Outputs Of (at least 27 )
func Between (start, end Point ) Point
func FromAngle (angle float64 ) Point
func NewPoint (x, y float64 ) Point
func ParsePoint (input string ) (Point , error )
func Chain .PointAt (distance float64 ) Point
func Point.Add (q Point ) Point
func Point.Bound (lowX, lowY, highX, highY float64 ) Point
func Point.Negate () Point
func Point.Normalize () Point
func Point.Rotate (angle float64 ) Point
func Point.Scale (factor float64 ) Point
func Point.ScaleToLength (length float64 ) Point
func Point.ScaleXY (x, y float64 ) Point
func Point.Sub (q Point ) Point
func Rectangle .BottomLeft () Point
func Rectangle .BottomRight () Point
func Rectangle .Center () Point
func Rectangle .Position () Point
func Rectangle .TopRight () Point
func github.com/d2lang/elk-go/internal/common/elkutil.EffectiveMinSizeConstraintFor (model *graph .Model , nodeID graph .NodeID ) Point
func github.com/d2lang/elk-go/internal/common/elkutil.ResizeNode (model *graph .Model , nodeID graph .NodeID , width, height float64 , movePorts, moveLabels bool ) Point
func github.com/d2lang/elk-go/internal/common/nodespacing.ProcessNodeSize (model *graph .Model , parent, nodeID graph .NodeID , apply bool , _ bool ) Point
func github.com/d2lang/elk-go/internal/force.(*FEdge ).SourcePoint () Point
func github.com/d2lang/elk-go/internal/force.(*FEdge ).TargetPoint () Point
func github.com/d2lang/elk-go/internal/graph.Shape .Position () Point
func github.com/d2lang/elk-go/internal/layered.(*LGraphArena ).ExternalPortPosition (graphID layered .LGraphID , dummyID layered .LNodeID , portWidth, portHeight float64 ) Point
func github.com/d2lang/elk-go/internal/layered.(*LGraphArena ).GraphActualSize (graphID layered .LGraphID ) Point
As Inputs Of (at least 17 )
func Between (start, end Point ) Point
func Chain .Offset (offset Point ) Chain
func Point.Add (q Point ) Point
func Point.Angle (q Point ) float64
func Point.Cross (q Point ) float64
func Point.Distance (q Point ) float64
func Point.Dot (q Point ) float64
func Point.FuzzyEqual (q Point , tolerance float64 ) bool
func Point.Sub (q Point ) Point
func Rectangle .Move (offset Point ) Rectangle
func github.com/d2lang/elk-go/internal/common/elkutil.TranslateAligned (model *graph .Model , parent graph .NodeID , newSize, oldSize Point )
func github.com/d2lang/elk-go/internal/core.TranslateSection (model *graph .Model , sectionID graph .SectionID , offset Point )
func github.com/d2lang/elk-go/internal/layered.(*LGraphArena ).CreateExternalPortDummy (propertyHolder *basegraph .PropertyMap , portConstraints layered .PortConstraints , portSide layered .PortSide , netFlow int , portNodeSize *Point , portPosition *Point , portSize Point , layoutDirection layered .Direction , graphID layered .LGraphID ) layered .LNodeID
func github.com/d2lang/elk-go/internal/layered.(*LGraphArena ).CreateExternalPortDummy (propertyHolder *basegraph .PropertyMap , portConstraints layered .PortConstraints , portSide layered .PortSide , netFlow int , portNodeSize *Point , portPosition *Point , portSize Point , layoutDirection layered .Direction , graphID layered .LGraphID ) layered .LNodeID
func github.com/d2lang/elk-go/internal/layered.(*LGraphArena ).CreateExternalPortDummy (propertyHolder *basegraph .PropertyMap , portConstraints layered .PortConstraints , portSide layered .PortSide , netFlow int , portNodeSize *Point , portPosition *Point , portSize Point , layoutDirection layered .Direction , graphID layered .LGraphID ) layered .LNodeID
func github.com/d2lang/elk-go/internal/layered.(*LGraphArena ).ResizeNode (nodeID layered .LNodeID , newSize Point , movePorts, moveLabels bool )
func github.com/d2lang/elk-go/internal/layered/intermediate/loops.(*Labels ).ApplyPlacement (arena *layered .LGraphArena , offset Point )
Package-Level Functions (total 8)
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 .