Expand description
Angle, factor, length, time, byte and resolution units.
Re-exports§
pub use zng_unit::*;
Structs§
- Align
xandyalignment.- Bool
Vector2D - A 2d vector of booleans, useful for component-wise logic operations.
- Factor2d
- Scale factor applied to x and y dimensions.
- Factor
Side Offsets - Scale factor applied to margins.
- Grid
Spacing - Spacing in-between grid cells in
Lengthunits. - Line
- 2D line in
Lengthunits. - Point
- 2D point in
Lengthunits. - PxConstraints
- Pixel length constraints.
- PxConstraints2d
- Pixel size constraints.
- PxGrid
Spacing - Computed
GridSpacing. - PxLine
- Computed
Line. - Rect
- 2D rect in
Lengthunits. - Side
Offsets - 2D size offsets in
Lengthunits. - Size
- 2D size in
Lengthunits. - Transform
- A transform builder type.
- Vector
- 2D vector in
Lengthunits.
Enums§
- Layout
Axis - Represents a layout dimension.
- Length
- 1D length units.
- Length
Expr - Represents an unresolved
Lengthexpression. - Parse
Composite Error - An error which can be returned when parsing an type composed of integers.
- Parse
Float Composite Error - 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
LAYOUTcontext. - Layout2d
- Represents a two-dimensional value that can be converted to a pixel value in a
LAYOUTcontext. - Length
Units - Extension methods for initializing
Lengthunits. - Line
From Tuples Builder - Build a
Lineusing the syntax(x1, y1).to(x2, y2). - Rect
From Tuples Builder - Build a
Rectusing the syntax(width, height).at(x, y).