Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PDF_TO_CSS_UNITS to the PixelsPerInch-structure #14055

Merged
merged 1 commit into from
Sep 22, 2021

Commits on Sep 20, 2021

  1. Add PDF_TO_CSS_UNITS to the PixelsPerInch-structure

    Rather than re-computing this value in a number of different places throughout the code-base[1], we can expose this in the API via the existing `PixelsPerInch`-structure instead.
    There's also been feature requests asking for the old `CSS_UNITS` viewer constant to be made accessible, such that it could be used in third-party implementations.
    
    I suppose that it could be argued that it's somewhat confusing to place a unitless property in `PixelsPerInch`, however given that the `PDF_TO_CSS_UNITS`-property is defined strictly in terms of the existing properties this is hopefully deemed reasonable.
    
    ---
    [1] These include:
     - The viewer, with the `CSS_UNITS` name.
     - The reference-tests.
     - The display-layer, when rendering images; see PR 13991.
    Snuffleupagus committed Sep 20, 2021
    Configuration menu
    Copy the full SHA
    3e550f3 View commit details
    Browse the repository at this point in the history