Module unit

Module unit 

Source
Expand description

Angle, factor, length, time, byte and resolution units.

Re-exports§

pub use zng_unit::*;

Structs§

Align
x and y alignment.
BoolVector2D
A 2d vector of booleans, useful for component-wise logic operations.
Factor2d
Scale factor applied to x and y dimensions.
FactorSideOffsets
Scale factor applied to margins.
GridSpacing
Spacing in-between grid cells in Length units.
Line
2D line in Length units.
Point
2D point in Length units.
PxConstraints
Pixel length constraints.
PxConstraints2d
Pixel size constraints.
PxGridSpacing
Computed GridSpacing.
PxLine
Computed Line.
Rect
2D rect in Length units.
SideOffsets
2D size offsets in Length units.
Size
2D size in Length units.
Transform
A transform builder type.
Vector
2D vector in Length units.

Enums§

LayoutAxis
Represents a layout dimension.
Length
1D length units.
LengthExpr
Represents an unresolved Length expression.
ParseCompositeError
An error which can be returned when parsing an type composed of integers.
ParseFloatCompositeError
An error which can be returned when parsing an type composed of integers.

Traits§

Layout1d
Represents a one-dimensional length value that can be converted to a pixel length in a LAYOUT context.
Layout2d
Represents a two-dimensional value that can be converted to a pixel value in a LAYOUT context.
LengthUnits
Extension methods for initializing Length units.
LineFromTuplesBuilder
Build a Line using the syntax (x1, y1).to(x2, y2).
RectFromTuplesBuilder
Build a Rect using the syntax (width, height).at(x, y).