Sha256: 3559e482864883a99a170f7be6d54ddc8ef2fadd1fde5d7268fe8d07f699dd22
Contents?: true
Size: 606 Bytes
Versions: 30
Compression:
Stored size: 606 Bytes
Contents
#! /usr/local/bin/ruby -w require 'RMagick' # Demonstrate the annotate method Text = 'RMagick' granite = Magick::ImageList.new('granite:') canvas = Magick::ImageList.new canvas.new_image(300, 100, Magick::TextureFill.new(granite)) text = Magick::Draw.new text.font_family = 'helvetica' text.pointsize = 52 text.gravity = Magick::CenterGravity text.annotate(canvas, 0,0,2,2, Text) { self.fill = 'gray83' } text.annotate(canvas, 0,0,-1.5,-1.5, Text) { self.fill = 'gray40' } text.annotate(canvas, 0,0,0,0, Text) { self.fill = 'darkred' } #canvas.display canvas.write('rubyname.gif') exit
Version data entries
30 entries across 30 versions & 1 rubygems