flexrect

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbacks

type Callbacks interface {
	NodeFeaturePosition(name string, feature sketchpb.NodeFeature) (geometry.Point, error)
}

type FlexRect

type FlexRect struct {
	// contains filtered or unexported fields
}

func FromProto

func FromProto(pb *sketchpb.FlexRect) (*FlexRect, error)

func (*FlexRect) RequiredNodeFeatures

func (r *FlexRect) RequiredNodeFeatures() []NodeFeature

RequiredNodeFeatures returns the all node features referenced by dimensions. These must be resolvable before the FlexRect can be calculated.

func (*FlexRect) Resolve

func (r *FlexRect) Resolve(cb Callbacks) (geometry.Rect, error)

Resolve calculates the absolute position of the rectangle. Callbacks are invoked as necessary.

type NodeFeature

type NodeFeature struct {
	// contains filtered or unexported fields
}

func (*NodeFeature) Feature

func (f *NodeFeature) Feature() sketchpb.NodeFeature

func (*NodeFeature) NodeName

func (f *NodeFeature) NodeName() string

func (*NodeFeature) String

func (f *NodeFeature) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL