File: composite.rb

package info (click to toggle)
ruby-mojo-magick 0.6.8-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 376 kB
  • sloc: ruby: 755; makefile: 4
file content (20 lines) | stat: -rwxr-xr-x 402 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env ruby
require "mojo_magick"

MojoMagick.convert(nil, "composite_out.png") do |c|
  c.size "200x200"
  c.delay 100
  c.image_block do # first layer
    c.background "blue"
    c.fill "white"
    c.gravity "northwest"
    c.label "NW"
  end
  c.image_block do # second layer
    c.background "transparent"
    c.fill "red"
    c.gravity "southeast"
    c.label "SE"
  end
  c.composite
end