Sha256: fd93adb5d67fc2988184f711555dbc5baa2b2af951e9678bd5f6544bcc300f3d

Contents?: true

Size: 481 Bytes

Versions: 54

Compression:

Stored size: 481 Bytes

Contents

#!/usr/bin/env ruby

top = File.expand_path(File.join(File.dirname(__FILE__), ".."))
$LOAD_PATH.unshift File.join(top, "ext", "cairo")
$LOAD_PATH.unshift File.join(top, "lib")

require "cairo"

width = 200
height = 200

Cairo::PDFSurface.new("link.pdf", width, height) do |surface|
  Cairo::Context.new(surface) do |context|
    context.move_to(50, 50)
    context.tag(Cairo::Tag::LINK, "uri='http://rcairo.github.io/'") do
      context.show_text("rcairo site")
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
cairo-1.17.13 samples/link.rb
cairo-1.17.12 samples/link.rb
cairo-1.17.11 samples/link.rb
cairo-1.17.10 samples/link.rb
cairo-1.17.9 samples/link.rb
cairo-1.17.8 samples/link.rb
cairo-1.17.7 samples/link.rb
cairo-1.17.6 samples/link.rb
cairo-1.17.5 samples/link.rb
cairo-1.17.4 samples/link.rb
cairo-1.16.6 samples/link.rb
cairo-1.16.5 samples/link.rb
cairo-1.16.4 samples/link.rb
cairo-1.16.3 samples/link.rb
cairo-1.16.2 samples/link.rb
cairo-1.16.1-x86-mingw32 samples/link.rb
cairo-1.16.1-x64-mingw32 samples/link.rb
cairo-1.16.1 samples/link.rb
cairo-1.16.0-x86-mingw32 samples/link.rb
cairo-1.16.0-x64-mingw32 samples/link.rb