2 changed files with 34 additions and 0 deletions
@ -1,2 +1,19 @@ |
|||||||
cm |
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) |
||||||
|
|||||||
@ -1,2 +1,19 @@ |
|||||||
inches |
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) |
||||||
|
|||||||
Loading…
Reference in new issue