Expand description
Angle, factor, length, time, byte and resolution units.
Modules§
- euclid
- A collection of strongly typed math tools for computer graphics with an inclination towards 2d graphics and layout.
Structs§
- Align
xandyalignment.- Angle
Degree - Angle in degrees.
- Angle
Gradian - Angle in gradians.
- Angle
Radian - Angle in radians.
- Angle
Turn - Angle in turns (complete rotations).
- Bool
Vector2D - A 2d vector of booleans, useful for component-wise logic operations.
- Byte
Length - A length in bytes.
- Corner
Radius2D - Ellipses that define the radius of the four corners of a 2D box.
- Dip
- Device independent pixel.
- Distance
Key - Comparable key that represents the absolute distance between two pixel points.
- Factor
- Normalized multiplication factor.
- Factor2d
- Scale factor applied to x and y dimensions.
- Factor
Percent - Multiplication factor in percentage (0%-100%).
- 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. - Px
- Device pixel.
- PxConstraints
- Pixel length constraints.
- PxConstraints2d
- Pixel size constraints.
- PxDensity
- Measurement of pixels in a screen or points in print.
- PxGrid
Spacing - Computed
GridSpacing. - PxLine
- Computed
Line. - Rect
- 2D rect in
Lengthunits. - Rgba
- RGB + alpha.
- Rgba
Component - Color functions argument conversion helper.
- Side
Offsets - 2D size offsets in
Lengthunits. - Side
Offsets2D - A group of 2D side offsets, which correspond to top/right/bottom/left for borders, padding, and margins in CSS, optionally tagged with a unit.
- 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. - Orientation2D
- Orientation of two 2D items.
- 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.
- Parse
IntComposite Error - An error which can be returned when parsing an type composed of integers.
- PxTransform
- A transform in device pixels.
Constants§
- EQ_
GRANULARITY - Minimal bucket size for equality between values in around the 0.0..=1.0 scale.
- EQ_
GRANULARITY_ 100 - Minimal bucket size for equality between values in around the 1.0..=100.0 scale.
Traits§
- Angle
Units - Extension methods for initializing angle units.
- Byte
Units - Extension methods for initializing
ByteLengthvalues. - DipToPx
- Conversion from
DiptoPxunits. - Factor
Units - Extension methods for initializing factor units.
- 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). - PxDensity
Units - Extension methods for initializing pixel density units.
- PxToDip
- Conversion from
PxtoDipunits. - Rect
From Tuples Builder - Build a
Rectusing the syntax(width, height).at(x, y). - Time
Units - Extension methods for initializing
Durationvalues.
Functions§
- about_
eq f32equality used in floating-point units.- about_
eq_ hash f32hash compatible withabout_eqequality.- about_
eq_ ord f32ordering compatible withabout_eqequality.
Type Aliases§
- DipBox
- A rectangle box in device independent pixels.
- DipCorner
Radius - Corner-radius in device independent pixels.
- DipPoint
- A point in device independent pixels.
- DipRect
- A rectangle in device independent pixels.
- DipSide
Offsets - Side-offsets in device independent pixels.
- DipSize
- A size in device pixels.
- DipVector
- A vector in device independent pixels.
- PxBox
- A rectangle box in device pixels.
- PxCorner
Radius - Corner-radius in device pixels.
- PxDensity2d
- Pixel density value that can differ between dimensions.
- PxPoint
- A point in device pixels.
- PxRect
- A rectangle in device pixels.
- PxSide
Offsets - Side-offsets in device pixels.
- PxSize
- A size in device pixels.
- PxVector
- A vector in device pixels.