Class: RGhost::HorizontalLine
- 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
-
#initialize(valign = :middle, options = {}) ⇒ HorizontalLine
constructor
A new instance of HorizontalLine.
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=DEFAULT_OPTIONS.dup.merge() 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 |