samples/load_images.rb in squib-0.0.4 vs samples/load_images.rb in squib-0.0.5
- old
+ new
@@ -17,13 +17,18 @@
# WARNING! If you choose to use the SVG ID, the x-y coordinates are still
# relative to the SVG page. See this example in an SVG editor
svg file: 'offset.svg', id: 'thing', x: 0, y: 0, width: 600, height: 600
- # Over 15 different blending operators are supported.
+ # Over 15 different blending operators are supported.
# See http://cairographics.org/operators
# Alpha transparency too
png file: 'ball.png', x: 50, y: 700
png file: 'grit.png', x: 70, y: 750, blend: :color_burn, alpha: 0.75
+
+ # Images can be rotated around their upper-left corner
+ png file: 'shiny-purse.png', x: 300, y: 700, angle: 0.0 # default (no rotate)
+ png file: 'shiny-purse.png', x: 300, y: 800, angle: Math::PI / 4
+ svg file: 'spanner.svg', x: 300, y: 900, angle: Math::PI / 2 - 0.1
save prefix: 'load_images_', format: :png
end