PHP 7.4.33
Preview: PixelRatio.d.ts Size: 2.09 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/react-native/Libraries/Utilities/PixelRatio.d.ts
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @format
 */

export interface PixelRatioStatic {
  /*
          Returns the device pixel density. Some examples:
              PixelRatio.get() === 1
              mdpi Android devices (160 dpi)
              PixelRatio.get() === 1.5
              hdpi Android devices (240 dpi)
              PixelRatio.get() === 2
              iPhone 4, 4S
              iPhone 5, 5c, 5s
              iPhone 6
              xhdpi Android devices (320 dpi)
              PixelRatio.get() === 3
              iPhone 6 plus
              xxhdpi Android devices (480 dpi)
              PixelRatio.get() === 3.5
              Nexus 6
      */
  get(): number;

  /*
          Returns the scaling factor for font sizes. This is the ratio that is
          used to calculate the absolute font size, so any elements that
          heavily depend on that should use this to do calculations.

          * on Android value reflects the user preference set in Settings > Display > Font size
          * on iOS value reflects the user preference set in Settings > Display & Brightness > Text Size,
            value can also be updated in Settings > Accessibility > Display & Text Size > Larger Text

          If a font scale is not set, this returns the device pixel ratio.
          */
  getFontScale(): number;

  /**
   * Converts a layout size (dp) to pixel size (px).
   * Guaranteed to return an integer number.
   */
  getPixelSizeForLayoutSize(layoutSize: number): number;

  /**
   * Rounds a layout size (dp) to the nearest layout size that
   * corresponds to an integer number of pixels. For example,
   * on a device with a PixelRatio of 3,
   * PixelRatio.roundToNearestPixel(8.4) = 8.33,
   * which corresponds to exactly (8.33 * 3) = 25 pixels.
   */
  roundToNearestPixel(layoutSize: number): number;

  /**
   * No-op for iOS, but used on the web. Should not be documented. [sic]
   */
  startDetecting(): void;
}

export const PixelRatio: PixelRatioStatic;

Directory Contents

Dirs: 2 × Files: 53
Name Size Perms Modified Actions
differ DIR
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
__mocks__ DIR
- drwxr-xr-x 2025-03-28 11:04:42
Edit Download
1.69 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
4.16 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.67 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.06 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
769 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
503 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
902 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
830 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.51 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
6.89 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
441 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.67 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.73 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
315 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.48 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
897 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
2.35 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.54 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
4.08 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
521 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.01 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
824 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
10.51 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
742 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
443 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.42 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.42 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
760 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
721 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
407 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
402 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
418 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
458 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
442 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.04 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.09 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
4.21 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.24 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.31 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
2.21 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.45 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
304 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.70 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.35 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
7.26 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
899 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
3.72 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
466 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
701 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.84 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.39 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.37 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
732 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).