Sha256: a7af4cdc19e29e7b8443c73bc19e5b353f81ee8bfa37d11b61ef4413f2d44831

Contents?: true

Size: 607 Bytes

Versions: 6

Compression:

Stored size: 607 Bytes

Contents

#!/usr/bin/env ruby -w
require 'rmagick'

# Demonstrate the Draw#text_undercolor method

canvas = Magick::Image.new(250, 100) { self.background_color = 'white' }

gc = Magick::Draw.new

gc.font_weight(Magick::NormalWeight)
gc.font_style(Magick::NormalStyle)
gc.stroke('transparent')
gc.pointsize(16)
gc.gravity(Magick::CenterGravity)

gc.text_undercolor('cyan')
gc.text(0, -20, "text_undercolor('cyan')")

gc.text_undercolor('yellow')
gc.text(0, 0, "text_undercolor('yellow')")

gc.text_undercolor('pink')
gc.text(0, 20, "text_undercolor('pink')")

gc.draw(canvas)

canvas.write('text_undercolor.gif')
exit

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rmagick-4.1.0.rc2 doc/ex/text_undercolor.rb
rmagick-4.1.0.rc1 doc/ex/text_undercolor.rb
rmagick-4.0.0 doc/ex/text_undercolor.rb
rmagick-3.2.0 doc/ex/text_undercolor.rb
rmagick-3.1.0 doc/ex/text_undercolor.rb
rmagick-3.0.0 doc/ex/text_undercolor.rb