SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...
    • Round a CSS stroke width to a whole number of device pixels (minimum 1 device pixel), returned in CSS pixels.

      A fractional device-pixel width (e.g. a 1px CSS stroke at a 1.5 dpr) cannot render crisply - the browser anti-aliases it, and the result drifts as the dpr changes. Rounding to whole device pixels keeps the stroke crisp at any dpr.

      Parameters

      • cssWidth: number
      • dpr: number = ...

      Returns number