docs: document units better

dev
Andy Meneely 2016-11-15 15:25:55 -05:00
parent 7c66644955
commit 0dcd2a06bc
4 changed files with 7 additions and 3 deletions

View File

@ -5,6 +5,10 @@ By default, Squib thinks in pixels. This decision was made so that we can have p
Here are some examples, which `lives here <https://github.com/andymeneely/squib/tree/master/samples/units.rb>`_
.. literalinclude:: ../samples/units.rb
.. literalinclude:: ../samples/units/_units.rb
:language: ruby
:linenos:
.. raw:: html
<img src="units/units_00_expected.png">

View File

@ -1,7 +1,7 @@
require 'squib'
Squib::Deck.new(width: '1.5in', height: '1.5in') do
background color: '#ddd'
background color: :white
# We can use our DSL-method to use inches
# Computed using @dpi (set to 300 by default)

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1,6 +1,6 @@
cairo: antialias=(["subpixel"])
cairo: save([])
cairo: set_source_color(["#ddd"])
cairo: set_source_color(["white"])
cairo: paint([])
cairo: restore([])
cairo: save([])