Skip to content
Squeegy edited this page Sep 12, 2010 · 9 revisions

text(string_to_write, options = {})

Draw text on the image. Customize size, position, color, dropshadow, and font.

  • string_to_write
    This required argument is the actual string that gets written to the image.

Use the following keys in the options hash:

  • :alignment
    A symbol that tells Fleximage where to put the text. Can be any of the following: :center, :top, :top_right, :right, :bottom_right, :bottom, :bottom_left, :left, :top_left.
  • :position
  • antialias: true or false
  • color: string or color(r, g, b)
  • font_size: integer
  • font: path to a font file relative to RAILS_ROOT
  • rotate: degrees as an integer
  • shadow: {:blur => 1, :opacity => 1.0}

Example


Back to Operators

Clone this wiki locally