From 64b34406580d6779c52f70c560de1be4ac37a3a7 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Fri, 29 Jan 2016 08:03:34 -0500 Subject: [PATCH] docs: port inches and cm to readthedocs --- docs/dsl/cm.rst | 17 +++++++++++++++++ docs/dsl/inches.rst | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/docs/dsl/cm.rst b/docs/dsl/cm.rst index 68e4fa9..9d1a0f1 100644 --- a/docs/dsl/cm.rst +++ b/docs/dsl/cm.rst @@ -1,2 +1,19 @@ cm -- + +Given centimeters, returns the number of pixels according to the deck's DPI. + +Parameters +^^^^^^^^^^ + +n + the number of centimeters + + +Examples +^^^^^^^^ + +.. code-block:: ruby + + cm(1) # 118.11px (for default Deck::dpi of 300) + cm(2) + cm(1) # 354.33ox (for default Deck::dpi of 300) diff --git a/docs/dsl/inches.rst b/docs/dsl/inches.rst index 7c9a7ca..d561e07 100644 --- a/docs/dsl/inches.rst +++ b/docs/dsl/inches.rst @@ -1,2 +1,19 @@ inches ------ + +Given inches, returns the number of pixels according to the deck's DPI. + +Parameters +^^^^^^^^^^ + +n + the number of inches + + +Examples +^^^^^^^^ + +.. code-block:: ruby + + inches(2.5) # 750 (for default Deck::dpi of 300) + inches(2.5) + inches(0.5) # 900 (for default Deck::dpi of 300)