Added blending operators to png and svg

Also refactored to start using save/restore more often
This commit is contained in:
Andy Meneely
2014-08-12 12:23:54 -04:00
parent 167cd0fdf3
commit b3eb3b6876
11 changed files with 117 additions and 91 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

+5 -1
View File
@@ -1,7 +1,7 @@
require 'squib'
Squib::Deck.new(width: 825, height: 1125, cards: 1) do
background color: :white
background color: '#0b7c8e'
rect x: 38, y: 38, width: 750, height: 1050, x_radius: 38, y_radius: 38
png file: 'shiny-purse.png', x: 620, y: 75
@@ -19,5 +19,9 @@ Squib::Deck.new(width: 825, height: 1125, cards: 1) do
# 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. See http://cairographics.org/operators
png file: 'ball.png', x: 50, y: 700
png file: 'grit.png', x: 70, y: 750, blend: :color_burn
save prefix: 'load_images_', format: :png
end
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB