border.rb

Path: border.rb
Last Update: Fri May 16 18:16:59 -0300 2008

Border object render a border around of vector shapes. Its sketch can be a combination of color, dashes, line joins and line caps. Usually its use inside of object facades, such as, Document, CallbackFacade and PsFacade as parameter :border, for example:

  d=Document.new
  d.horizontal_line :middle, :border => { :color => '#058412', :dash => [1,0,2] }

You can use it as a new instance of Border and set inside of Document by method set, example:

  d=Document.new
  b=Border.new :color => '#058412', :dash => [1,0,2]
  d.set b
  d.lineto :x => 2.5, :y => 5

Options

  • :color - Facade to Color using the same parameter.
  • :dash - Facade to Dash using the same parameter.
  • :width - Facade to LineWidth using the same parameter.
  • :linejoin - Sets the line join parameter in the graphics state to int, which must be one of the integers 0, 1, or 2.

:linejoin examples

  • Miter join :linejoin => 0
  • Round join :linejoin => 1
  • Bevel join :linejoin => 2
  • :linecap - Sets the line cap parameter in the graphics state to int, which must be one of the integers 0, 1, or 2

:linecap examples

  • Butt cap :linecap => 0
  • Round cap :linecap => 1
  • Projecting square cap :linecap => 2

[Validate]