docs: document units better
parent
7c66644955
commit
0dcd2a06bc
|
|
@ -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([])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue