dirs (owner)

Revisions

gist: 164965 Download_button fork
public
Public Clone URL: git://gist.github.com/164965.git
Embed All Files: show embed
buttons.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# botões de RTs em imagem são pre-processados
require 'rubygems'
require 'RMagick'
 
include Magick
 
BG = File.join(File.expand_path(File.dirname(__FILE__)), '../public/hype/img/', 'button.png')
 
10.times do |i|
  im = ImageList.new(BG)
  text = Magick::Draw.new
  text.font_family = 'helvetica'
  text.pointsize = 22
  text.annotate(im, 0,0,0,-22, "#{i}") {
    self.gravity = CenterGravity
   self.fill = '#fff'
  }
  im.write("#{i}.png")
end