/**
 * Copyright 2004-present Facebook. All Rights Reserved.
 *
 * @providesModule PixelRatio
 */
'use strict';

var Dimensions = require('Dimensions');

/**
 * PixelRatio class gives access to the device pixel density.
 *
 * Some examples:
 *   - PixelRatio.get() === 2
 *     - iPhone 4, 4S
 *     - iPhone 5, 5c, 5s
 *     - iPhone 6
 *
 *   - PixelRatio.get() === 3
 *     - iPhone 6 plus
 *
 * There are a few use cases for using PixelRatio:
 *
 * == Displaying a line that's as thin as the device permits
 *
 * A width of 1 is actually pretty thick on an iPhone 4+, we can do one that's
 * thinner using a width of 1 / PixelRatio.get(). It's a technique that works
 * on all the devices independent of their pixel density.
 *
 *   style={{ borderWidth: 1 / PixelRatio.get() }}
 *
 * == Fetching a correctly sized image
 *
 * You should get a higher resolution image if you are on a high pixel density
 * device. A good rule of thumb is to multiply the size of the image you display
 * by the pixel ratio.
 *
 *   var image = getImage({
 *     width: 200 * PixelRatio.get(),
 *     height: 100 * PixelRatio.get()
 *   });
 *   <Image source={image} style={{width: 200, height: 100}} />
 */
class PixelRatio {
  static get() {
    return Dimensions.get('window').scale;
  }

  static startDetecting() {
    // no-op for iOS, but this is useful for other platforms
  }
};

module.exports = PixelRatio;

@@ -220,181 +220,8 @@
 %0A *%0A
- * Some examples:%0A *   - PixelRatio.get() === 2%0A *     - iPhone 4, 4S%0A *     - iPhone 5, 5c, 5s%0A *     - iPhone 6%0A *%0A *   - PixelRatio.get() === 3%0A *     - iPhone 6 plus%0A *%0A
  * T
@@ -273,18 +273,19 @@
 :%0A *%0A * 
-==
+###
  Display
@@ -442,16 +442,17 @@
 idth of 
+%60
 1 / Pixe
@@ -463,16 +463,17 @@
 io.get()
+%60
 . It's a
@@ -558,17 +558,22 @@
 .%0A *%0A * 
- 
+%60%60%60%0A *
  style=%7B
@@ -617,14 +617,22 @@
 %7D%0A *
-%0A * ==
+ %60%60%60%0A *%0A * ###
  Fet
@@ -853,17 +853,22 @@
 .%0A *%0A * 
- 
+%60%60%60%0A *
  var ima
@@ -885,18 +885,16 @@
 age(%7B%0A *
-  
    width
@@ -924,18 +924,16 @@
 ),%0A *   
-  
 height: 
@@ -961,19 +961,15 @@
 )%0A *
-  
  %7D);%0A *
-  
  %3CIm
@@ -1024,16 +1024,23 @@
 00%7D%7D /%3E%0A
+ * %60%60%60%0A
  */%0Aclas
@@ -1054,16 +1054,248 @@
 Ratio %7B%0A
+  /**%0A   * Returns the device pixel density. Some examples:%0A   *%0A   *   - PixelRatio.get() === 2%0A   *     - iPhone 4, 4S%0A   *     - iPhone 5, 5c, 5s%0A   *     - iPhone 6%0A   *   - PixelRatio.get() === 3%0A   *     - iPhone 6 plus%0A   */%0A
   static
@@ -1354,45 +1354,15 @@
   %7D%0A
-%0A  static startDetecting() %7B%0A    // n
+%7D%0A%0A// N
 o-op
@@ -1379,47 +1379,91 @@
 but 
-this is useful for other platforms%0A  %7D%0A
+used on the web. Should not be documented.%0APixelRatio.startDetecting = function() %7B
 %7D;%0A%0A

Improve PixelRatio documentation