Sha256: ff1427039c6ec41c04df526318e24fdb2c7d0b7ae6a5f2aa9902e81729a2d631

Contents?: true

Size: 599 Bytes

Versions: 13

Compression:

Stored size: 599 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

13 entries across 13 versions & 3 rubygems

Version Path
rmagick-windows-2.16.5 doc/ex/text_undercolor.rb
rmagick-windows-2.16.4 doc/ex/text_undercolor.rb
rmagick-windows-2.16.3 doc/ex/text_undercolor.rb
rmagick-windows-2.16.2 doc/ex/text_undercolor.rb
rmagick-windows-2.16.1 doc/ex/text_undercolor.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/doc/ex/text_undercolor.rb
rmagick-2.16.0 doc/ex/text_undercolor.rb
rmagick-2.15.4 doc/ex/text_undercolor.rb
rmagick-2.15.3 doc/ex/text_undercolor.rb
rmagick-2.15.2 doc/ex/text_undercolor.rb
rmagick-2.15.1 doc/ex/text_undercolor.rb
rmagick-2.15.0 doc/ex/text_undercolor.rb
rmagick-2.14.0 doc/ex/text_undercolor.rb