Skip to content

Instantly share code, notes, and snippets.

@erubboli
Created November 16, 2010 17:46
Show Gist options
  • Save erubboli/702149 to your computer and use it in GitHub Desktop.
Save erubboli/702149 to your computer and use it in GitHub Desktop.
parent.image.combine_options do |c|
c.fill hex_color
c.pointsize @obj.media.font_size
#c.font "#{RAILS_ROOT}/public/images/fonts/#{@obj.font.downcase}.ttf"
draw_params = ''
draw_params += "gravity #{gravity} " if gravity
#cmd += "scale #{scale},#{scale} " if scale
draw_params += "rotate #{degrees} " if degrees
##TODO: escape text characters!!
c.draw "#{draw_params}text #{@obj.x} #{@obj.y} '#{@obj.media.text}'"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment