parse_dimension

Function parse_dimension 

Source
pub fn parse_dimension(s: &str) -> Result<HwpUnit, BlueprintError>
Expand description

Parses a dimension string into HwpUnit.

Supported suffixes (case-insensitive):

  • pt — points (1pt = 100 HwpUnit)
  • mm — millimeters (1mm ≈ 2.835pt)
  • in — inches (1in = 72pt)

Also accepts a plain number as raw HwpUnit value.