pub trait UnitExt {
// Required methods
fn pct(self) -> Pct;
fn pt(self) -> Pt;
fn em(self) -> Em;
fn lh(self) -> Lh;
fn px(self) -> Pt;
fn deg(self) -> Angle;
fn rad(self) -> Angle;
}Required Methods§
Sourcefn pct(self) -> Pct
fn pct(self) -> Pct
Create a percentage unit.
The final basis depends on the property being styled.
Sourcefn pt(self) -> Pt
fn pt(self) -> Pt
Create an absolute Floem point unit.
Floem resolves points in logical view space. The renderer applies the window scale factor later when drawing to the target surface.
Sourcefn px(self) -> Pt
👎Deprecated: use .pt() instead
fn px(self) -> Pt
use .pt() instead
Deprecated alias for UnitExt::pt.