Expand description
Pixel units and the checked numbers that go with them.
Logical pixels are what layout and the semantic tree use. Physical pixels are what a
frame holds. The only way from one to the other is through a ScaleFactor, so a value in
the wrong unit does not compile.
Structs§
- Invalid
Ratio - A ratio that is not finite or lies outside 0 to 1.
- Invalid
Scale Factor - A scale factor that is not finite or lies outside 0.5 to 4.0.
- Logical
- A value in logical pixels.
- Physical
- A value in physical pixels. Made by multiplying a
Logicalvalue by aScaleFactor, or withPhysical::newwhere a value really is physical. - Ratio
- A number from 0 to 1 inclusive, such as a diff threshold, so that a percentage cannot be passed by mistake.
- Scale
Factor - The ratio of physical to logical pixels: finite and from 0.5 to 4.0.
Traits§
- Scalable
- Values that a
ScaleFactorcan scale between logical and physical pixels. Sealed.