Sha256: 86a319b7ffea68bcd1b68a1f2c8c68c2e556f4808f477c55b1b7f4e73746032d

Contents?: true

Size: 415 Bytes

Versions: 6

Compression:

Stored size: 415 Bytes

Contents

load_library :pdf
require 'geomerative'

attr_reader :grp, :pdf

def settings
  size(400, 400)
  smooth
end

def setup
  sketch_title 'SVG to PDF sketch'
  RG.init(self)
  @grp = RG.load_shape(data_path('bot1.svg'))
  @pdf = create_graphics(width, height, PDF, data_path('bot1.pdf'))
end

def draw
  background(255)
  grp.draw
  pdf.begin_draw
  pdf.background(255)
  grp.draw(pdf)
  pdf.dispose
  pdf.end_draw
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geomerative-2.1.0-java examples/hello_svg_to_pdf.rb
geomerative-2.0.0-java examples/hello_svg_to_pdf.rb
geomerative-1.1.0-java examples/hello_svg_to_pdf.rb
geomerative-1.0.2-java examples/hello_svg_to_pdf.rb
geomerative-0.4.3-java examples/hello_svg_to_pdf.rb
geomerative-0.4.2-java examples/hello_svg_to_pdf.rb