Sha256: 218fe7f5ff603555772b137003da30c4a9541617794a823f2a9b287df2aac304
Contents?: true
Size: 802 Bytes
Versions: 13
Compression:
Stored size: 802 Bytes
Contents
# encoding: utf-8 # # Rounded rectangle example demonstrating both stroke and stroke and fill. # A rectangle with rounded join_style is added just for comparison. # require "#{File.dirname(__FILE__)}/../example_helper.rb" pdf = Prawn::Document.new pdf.font_size 8 pdf.draw_text "a stroked rounded rectangle:", :at => [30, 575] pdf.stroke_rounded_rectangle([50, 550], 50, 100, 10) pdf.draw_text "a stroked and filled rounded rectangle:", :at => [180, 575] pdf.fill_and_stroke_rounded_rectangle([200, 550], 50, 100, 10) pdf.draw_text "a regular rectangle with rounded join style;", :at => [330, 575] pdf.draw_text "needs thick line width for similar result:", :at => [330, 565] pdf.join_style :round pdf.line_width 10 pdf.stroke_rectangle([350, 550], 50, 100) pdf.render_file "rounded_rectangle.pdf"
Version data entries
13 entries across 13 versions & 6 rubygems