Documentation ¶
Index ¶
- Constants
- func Align(on Axis, frac, target Scalar, shapes ...Shape)
- func Spread(on Axis, frac, start, stop Scalar, shapes ...Shape)
- type Axis
- type BBox
- type Border
- type Container
- type Rect
- func (r *Rect) BBox() BBox
- func (r *Rect) Move(dx, dy Scalar)
- func (r *Rect) SetXmax(x Scalar)
- func (r *Rect) SetXmin(x Scalar)
- func (r *Rect) SetYmax(y Scalar)
- func (r *Rect) SetYmin(y Scalar)
- func (r Rect) Xmax() Scalar
- func (r Rect) Xmin() Scalar
- func (r Rect) Ymax() Scalar
- func (r Rect) Ymin() Scalar
- type Scalar
- func Extent(bb BBox, axis Axis) Scalar
- func ExtentOf(s Shape, axis Axis) Scalar
- func ForceOf(s1, s2 Shape, axis Axis) Scalar
- func Frac(bb BBox, f float64, axis Axis) Scalar
- func FracOf(s Shape, f float64, axis Axis) Scalar
- func Gap(b1, b2 BBox, axis Axis) Scalar
- func GapOf(s1, s2 Shape, axis Axis) Scalar
- func Height(bb BBox) Scalar
- func MaxOf(s Shape, axis Axis) Scalar
- func MinOf(s Shape, axis Axis) Scalar
- func Width(bb BBox) Scalar
- type Shape
Constants ¶
View Source
const ( XAxis = axisX(false) YAxis = axisY(true) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Scalar ¶
type Scalar = float64
func ForceOf ¶
ForceOf computes the distance the two shapes would have to be moved apart alog the axis to avoid an overlap. The calculation takes into account possible margins that may be created by Borders.
Click to show internal directories.
Click to hide internal directories.