docs: document units better
This commit is contained in:
+5
-1
@@ -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">
|
||||
|
||||
@@ -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 |
@@ -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([])
|
||||
|
||||
Reference in New Issue
Block a user