Documentation ¶
Overview ¶
Package relpos defines a position relationship among layers, in terms of X,Y width and height of layer and associated position within a given X-Y plane, and Z vertical stacking of layers above and below each other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var KiT_Relations = kit.Enums.AddEnum(RelationsN, false, nil)
Functions ¶
This section is empty.
Types ¶
type Rel ¶
type Rel struct { Rel Relations `desc:"spatial relationship between this layer and the other layer"` XAlign XAligns `viewif:"Rel=FrontOf,Behind,Above,Below" desc:"horizontal (x-axis) alignment relative to other"` YAlign YAligns `viewif:"Rel=LeftOf,RightOf,Above,Below" desc:"vertical (y-axis) alignment relative to other"` Other string `desc:"name of the other layer we are in relationship to"` Scale float32 `desc:"scaling factor applied to layer size for displaying"` Space float32 `desc:"number of unit-spaces between us"` Offset float32 `desc:"for alignment, amount we are offset relative to perfect alignment"` }
Rel defines a position relationship among layers, in terms of X,Y width and height of layer and associated position within a given X-Y plane, and Z vertical stacking of layers above and below each other.
func (*Rel) AlignXPos ¶
AlignXPos returns the X-axis (within-plane horizontal or width) position according to alignment factors
func (*Rel) AlignYPos ¶
AlignYPos returns the Y-axis (within-plane vertical or height) position according to alignment factors
type Relations ¶
type Relations int
Relations are different spatial relationships (of layers)
func (*Relations) FromString ¶
func (Relations) MarshalJSON ¶
func (*Relations) UnmarshalJSON ¶
type XAligns ¶
type XAligns int
XAligns are different horizontal alignments
func (*XAligns) FromString ¶
func (XAligns) MarshalJSON ¶
func (*XAligns) UnmarshalJSON ¶
type YAligns ¶
type YAligns int
YAligns are different vertical alignments