Class: RGhost::Barcode::Border

Inherits:
Parameter
  • Object
show all
Defined in:
lib/rghost_barcode/rghost_barcode_base.rb

Overview

Display border properties. It’s used on the contructor of the class RGhost::Barcode::Base(parent of all barcodes) by Hash :border. Between parenthesis the original parameter.

  • :show(showborder) - Enabled by true. Example: :show => true

  • :width(borderwidth) - Width of border in points.

  • :left, :right, :top, :bottom( borderleft, borderright, bordertop, borderbottom) - specifies the width of the each side of border.

  • :color(textcolor) - Color of text. Only rgb hex. Example: :color => ‘FF0000’

Example: doc=Document.new doc.barcode_interleaved2of5(‘0123456789’, :border => => 4, :left => 15, :right => 15, :show => true )

Instance Method Summary collapse

Instance Method Details

#makeObject



120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/rghost_barcode/rghost_barcode_base.rb', line 120

def make
  
  @options.each do |key,value| 
    case key
    when :color then add_color("bordercolor", value) 
    when :show then add_single("showborder")
    else
      add("border#{key}",value)
    end
  end
  
end