frame.rb

Path: frame.rb
Last Update: Thu May 15 10:55:48 -0300 2008

Creates one rectangle or one shape with rounded corners.

Options

  • :x and :y - Coordinates to position.
  • :corners - Value for rounded corners. Use 0 to straight angle.
  • :width and :height - Size of frame
  • :content - facade to ShapeContent with same parameters.
  • :border - facade to Border with same parameters.

Examples using facade frame method inside of Document

  d=Document.new
  d.frame :x => 3, :width => 7, :height => 5, :content => {:fill => false}

  d=Document.new
  d.frame :x => 3, :width => 7, :height => 5, :content => {:color => '#35F6A3' }

  d=Document.new
  d.frame :x => 3, :width => 7, :height => 5, :content => {:color => '#35F6A3' }, :border =>{:width => 5, :dash => [1,3,10]}

  d=Document.new
  d.frame :x => 3, :width => 7, :height => 5, :content => {:color => '#35F6A3' }, :corners => 20

  d=Document.new
  d.frame :x => 3, :width => 7, :height => 5, :content => {:color => :yellow }, :border => {:color => :red, :width => 4}, :corners => 20

[Validate]