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>`_
|
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
|
:language: ruby
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
|
.. raw:: html
|
||||||
|
|
||||||
|
<img src="units/units_00_expected.png">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
require 'squib'
|
require 'squib'
|
||||||
|
|
||||||
Squib::Deck.new(width: '1.5in', height: '1.5in') do
|
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
|
# We can use our DSL-method to use inches
|
||||||
# Computed using @dpi (set to 300 by default)
|
# 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: antialias=(["subpixel"])
|
||||||
cairo: save([])
|
cairo: save([])
|
||||||
cairo: set_source_color(["#ddd"])
|
cairo: set_source_color(["white"])
|
||||||
cairo: paint([])
|
cairo: paint([])
|
||||||
cairo: restore([])
|
cairo: restore([])
|
||||||
cairo: save([])
|
cairo: save([])
|
||||||
|
|||||||
Reference in New Issue
Block a user