Class: RGhost::HorizontalLine

Inherits:
PsObject
  • Object
show all
Defined in:
lib/rghost/horizontal_line.rb

Overview

Creates horizontal line on the current row.

Constant Summary collapse

DEFAULT_OPTIONS =
{:start_in => :limit_left, :size => :area_x,
  :border => RGhost::Border::DEFAULT_OPTIONS
  
}

Instance Method Summary collapse

Methods inherited from PsObject

#<<, #call, #graphic_scope, #ps, #raw, #set, #to_s

Constructor Details

#initialize(valign = :middle, options = {}) ⇒ HorizontalLine

Returns a new instance of HorizontalLine


35
36
37
38
39
40
41
42
43
# File 'lib/rghost/horizontal_line.rb', line 35

def initialize(valign=:middle,options={})
  @options=DEFAULT_OPTIONS.dup.merge(options)
  start_in= RGhost::Units::parse(@options[:start_in])
  size= RGhost::Units::parse(@options[:size])
  border=RGhost::Border.new(@options[:border])
  super("gsave #{border.ps }  #{start_in} #{size} horizontal_line_#{valign} grestore")
  #super("#{start_in} #{size} horizontal_line_#{valign}")

end